In my routes.php
file I have :
Route::get('/', function () {
return view('login');
});
Route::get('/index', function(){
return view('index');
});
Route::get('/register', function(){
return view('register');
});
Route::post('/register',function(){
$user = new AppUser;
$user->username = input::get('username');
$user->email = input::get('email');
$user->password = Hash::make(input::get('username'));
$user->designation = input::get('designation');
$user->save();
});
I have a form for users registration. I am also taking the form inputs value in the routes.php
.
But the error comes up when I register a user .
Error:
FatalErrorException in routes.php line 61:
Class 'input' not found
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…