laravel 5 : 未找到类“输入”
2022-08-30 07:12:28
在我的文件中,我有:routes.php
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 \App\User;
$user->username = input::get('username');
$user->email = input::get('email');
$user->password = Hash::make(input::get('username'));
$user->designation = input::get('designation');
$user->save();
});
我有一个用户注册表格。我还在 .routes.php
但是当我注册用户时出现错误。错误:
FatalErrorException in routes.php line 61:
Class 'input' not found