MethodNotAllowedHttpException in RouteCollection.php

来源:2-4 Laravel-通过表单实现新增及操作状态提示功能

qq_NHA_0

2017-05-05 20:03

什么情况

MethodNotAllowedHttpException in RouteCollection.php line 219:

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

at RouteCollection->match(object(Request)) in Router.php line 750

at Router->findRoute(object(Request)) in Router.php line 659

at Router->dispatchToRoute(object(Request)) in Router.php line 635

at Router->dispatch(object(Request)) in Kernel.php line 236

at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))

at call_user_func(object(Closure), object(Request)) in Pipeline.php line 139

at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in VerifyCsrfToken.php line 50

at VerifyCsrfToken->handle(object(Request), object(Closure))

at call_user_func_array(array(object(VerifyCsrfToken), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124

at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in ShareErrorsFromSession.php line 49

at ShareErrorsFromSession->handle(object(Request), object(Closure))

at call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124

at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in StartSession.php line 62

at StartSession->handle(object(Request), object(Closure))

at call_user_func_array(array(object(StartSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124

at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37

at AddQueuedCookiesToResponse->handle(object(Request), object(Closure))

at call_user_func_array(array(object(AddQueuedCookiesToResponse), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124

at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in EncryptCookies.php line 59

at EncryptCookies->handle(object(Request), object(Closure))

at call_user_func_array(array(object(EncryptCookies), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124

at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in CheckForMaintenanceMode.php line 44

at CheckForMaintenanceMode->handle(object(Request), object(Closure))

at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124

at Pipeline->Illuminate\Pipeline\{closure}(object(Request))

at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103

at Pipeline->then(object(Closure)) in Kernel.php line 122

at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 87

at Kernel->handle(object(Request)) in index.php line 54


写回答 关注

4回答

  • SemanTIC
    2017-08-25 17:23:49

    在method的方法里面要用get ,post会报错

  • 慕少4524987
    2017-08-13 10:21:50

    你在路由里面看看路由获取方式是get还是post

  • 幻想有双兔耳朵
    2017-07-07 10:37:31

    因为路由用的get?

  • qq_NHA_0
    2017-05-05 20:05:59

    额,解决了

    qq_O0_...

    怎么解决的,我也遇到这个问题

    2017-08-27 19:31:43

    共 1 条回复 >

轻松学会Laravel-表单篇

Laravel框架是世界上最流行的PHP框架,没有之一

32653 学习 · 255 问题

查看课程

相似问题