对于Button动作,它显示“MethodNotAllowedHttpException Laravel 5”

时间:2015-12-27 17:52:12

标签: laravel-5 laravel-routing

  

按钮代码

  <button type="submit" name="_token" value="<?php echo csrf_token(); ?>" href="{{route('regi') }}" class="btn">Sign up!</button>
  

路线

Route::get('regi', array('as' => 'regi', 'uses' => function()
{
   return view('register');
}));
  

错误

in RouteCollection.php line 219
at RouteCollection->methodNotAllowed(array('GET', 'HEAD')) in RouteCollection.php line 206
at RouteCollection->getRouteForMethods(object(Request), array('GET', 'HEAD')) in RouteCollection.php line 158

我是Laravel的新手。所以我无法弄清楚错误。请帮帮我。谢谢。

0 个答案:

没有答案