我想在Laravel中使用post方法,但它抛出了异常: RouteCollection.php第218行中的MethodNotAllowedHttpExceptionin RouteCollection.phpline 218
at RouteCollection->methodNotAllowed(array('GET', 'HEAD')) in RouteCollection.php line 2
在我将应用程序移到新服务器之前,我使用这种方法没有任何问题,但现在我得到了MethodNotAllowedHttpException。我使用了大约6个月的应用程序,没有任何问题。当然,当我将方法更改为post并添加隐藏的var _method时,它可以工作。但是我想知道在新服务器上设置会导致什么原因。有什么想法吗?异常详细信息:
in RouteCollection.ph
我必须通过浏览器访问PUT route并获取json对象,但是L5.2显示了一个MethodNotAllowedHttpException错误,我该如何解决这个问题?我的网址route.phpin RouteCollection.php line 218
at RouteCollection->methodNotAllowed(
这是邮递员的截图它显示了下面的例外邮递员!Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException: in file /home/elitbzfn/ecoplus.work/vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php o