Laravel 可能导致MethodNotAllowedHttpException的服务器端问题是什么

Laravel 可能导致MethodNotAllowedHttpException的服务器端问题是什么,laravel,Laravel,我在路由文件中使用Route::delete()方法。在我将应用程序移动到新服务器之前,使用此方法没有任何问题,但现在我得到了方法notallowedHttpException。我使用该应用程序大约6个月,没有出现任何问题。但现在我在每次删除过程中都会看到这个。当然,当我将方法更改为post并添加一个隐藏的var\u方法时,它就可以工作了。但我想知道是什么(设置)会导致新服务器出现这种情况。有什么想法吗 异常详细信息: MethodNotAllowedHttpException in Route

我在路由文件中使用
Route::delete()
方法。在我将应用程序移动到新服务器之前,使用此方法没有任何问题,但现在我得到了
方法notallowedHttpException
。我使用该应用程序大约6个月,没有出现任何问题。但现在我在每次删除过程中都会看到这个。当然,当我将方法更改为
post
并添加一个隐藏的var
\u方法时,它就可以工作了。但我想知道是什么(设置)会导致新服务器出现这种情况。有什么想法吗

异常详细信息:

MethodNotAllowedHttpException in RouteCollection.php line 218:

in RouteCollection.php line 218
at RouteCollection->methodNotAllowed(array('DELETE')) in RouteCollection.php line 205
at RouteCollection->getRouteForMethods(object(Request), array('DELETE')) in RouteCollection.php line 158
at RouteCollection->match(object(Request)) in Router.php line 821
at Router->findRoute(object(Request)) in Router.php line 691
at Router->dispatchToRoute(object(Request)) in Router.php line 675
at Router->dispatch(object(Request)) in Kernel.php line 246
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing\{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 136
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{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 132
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 99
at Kernel->handle(object(Request)) in index.php line 5

MethodNotAllowedHttpException
表示找不到http请求的路由。

MethodNotAllowedHttpException
表示找不到http请求的路由。

MethodNotAllowedHttpException表示请求的http方法不存在路由

路由::删除示例

Route::delete('empresas/eliminar/{id}', [
        'as' => 'companiesDelete',
        'uses' => 'CompaniesController@delete'
]);

methodNotAllowed异常表示您请求的HTTP方法不存在路由

路由::删除示例

Route::delete('empresas/eliminar/{id}', [
        'as' => 'companiesDelete',
        'uses' => 'CompaniesController@delete'
]);

但路线是存在的。此外,它工作了6个月,唯一的变化是服务器的变化。这就是我怀疑服务器设置的原因。@Skeletor可能是server.see中php版本的问题,请参阅了解laravel。但是路由存在。此外,它工作了6个月,唯一的变化是服务器的变化。这就是我怀疑服务器设置的原因。@Skeletor可能是server.see中php版本的问题,请参阅了解laravel。但是路由存在。此外,它工作了6个月,唯一的变化是服务器的变化。这就是我怀疑服务器设置的原因。您是否更改了laravel版本?laravel版本?没有。也许php版本已经改变了,但我认为这对这个案例来说并不重要。但是这个路线是存在的。此外,它工作了6个月,唯一的变化是服务器的变化。这就是我怀疑服务器设置的原因。您是否更改了laravel版本?laravel版本?没有。也许php版本已经改变了,但我认为这对这个案例来说并不重要。打开git看看最近发生了什么变化。这就是您的解决方案。触发请求的客户端是否有任何更改。?因为html表单不支持put、patch和deleteTry,只需清除缓存
php artisan route:clear
打开git,看看最近发生了什么变化。这就是您的解决方案。触发请求的客户端是否有任何更改。?因为html表单不支持通过清除缓存来放置、修补和删除