欢迎光临
我们一直在努力

Laravel提示The GET method is not supported for this route. Supported methods: POST.错误的解决办法

Laravel提示The GET method is not supported for this route. Supported methods: POST.错误,其实很简单就是配置路由的时候设置的是post,但是访问时采用的是get方式。

解决办法1:将路由改为any或者get

  Route::any('index', 'IndexController@index);

解决方法2:将请求方式改为post,比如在表单中设置

  method="post"

 

未经允许不得转载:主机之家测评 » Laravel提示The GET method is not supported for this route. Supported methods: POST.错误的解决办法