嗨,我用post方法路由我的html,我收到了这个错误:
MethodNotAllowedHttpException
我改为:
Route::get('/register', function()
{
return View::make('register');
});
它完美无缺
但是我发布了这样的输入:
Route::get('/register', function()
{
return View::make('register');
});
Route::post('/register', function()
{
$user = new User;
$user-> u_n = Input::get('u_n');
$user-> u_fn = Input::get('u_fn');
$user-> u_password = Input::get('u_password');
$user-> u_email = Input::get('u_email');
$user->save();
if ($user->save())
{
return Redirect::intended('/register');
}
});
我想知道它是否安全? 我怎么发帖而不是错误?