Symfony \组件\ HttpKernel \异常\ MethodNotAllowedHttpException#25782

时间:2018-10-01 13:15:03

标签: laravel

当我在laravel 5.7中闲置10分钟以上时出现此错误,但是当我立即注销时,它工作得很好,请问我是laravel的新手,我不知道如何解决该问题

Stacktrace:
#26 Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException in /home/thelink360/thelink/vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php:255
#25 Illuminate\Routing\RouteCollection:methodNotAllowed in /home/thelink360/thelink/vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php:242
#24 Illuminate\Routing\RouteCollection:getRouteForMethods in /home/thelink360/thelink/vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php:176
#23 Illuminate\Routing\RouteCollection:match in /home/thelink360/thelink/vendor/laravel/framework/src/Illuminate/Routing/Router.php:633
#22 Illuminate\Routing\Router:findRoute in /home/thelink360/thelink/vendor/laravel/framework/src/Illuminate/Routing/Router.php:622
#21 Illuminate\Routing\Router:dispatchToRoute in /home/thelink360/thelink/vendor/laravel/framework/src/Illuminate/Routing/Router.php:611
#20 Illuminate\Routing\Router:dispatch in /home/thelink360/thelink/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:176
#19 Illuminate\Foundation\Http\Kernel:Illuminate\Foundation\Http{closure} in /home/thelink360/thelink/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30
#18 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /home/thelink360/thelink/vendor/fideloper/proxy/src/TrustProxies.php:57
#17 Fideloper\Proxy\TrustProxies:handle in /home/thelink360/thelink/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151
#16 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /home/thelink360/thelink/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#15 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /home/thelink360/thelink/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:31
#14 Illuminate\Foundation\Http\Middleware\TransformsRequest:handle in /home/thelink360/thelink/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151
#13 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /home/thelink360/thelink/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#12 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /home/thelink360/thelink/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:31
#11 Illuminate\Foundation\Http\Middleware\TransformsRequest:handle in /home/thelink360/thelink/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151
#10 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /home/thelink360/thelink/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#9 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /home/thelink360/thelink/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27
#8 Illuminate\Foundation\Http\Middleware\ValidatePostSize:handle in /home/thelink360/thelink/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151
#7 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /home/thelink360/thelink/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#6 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /home/thelink360/thelink/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php:62
#5 Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode:handle in /home/thelink360/thelink/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151
#4 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /home/thelink360/thelink/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#3 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /home/thelink360/thelink/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:104
#2 Illuminate\Pipeline\Pipeline:then in /home/thelink360/thelink/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:151
#1 Illuminate\Foundation\Http\Kernel:sendRequestThroughRouter in /home/thelink360/thelink/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:116
#0 Illuminate\Foundation\Http\Kernel:handle in /home/thelink360/thelink/public/index.php:55

this is the web.php that has all the routes and i didn't the default route for login Auth::route() question is that when i login and logout immediately does not create an error but when its inactive for about 10 minutes and above that's when it creates an error so help me please 

   

Route::get('/single/{id}',function($id){

    $service = Alldata::find($id);

    return view('single_listing_2')->with(['service'=>$service]);
});

Auth::routes();

Route::get('/home','HomeController@index')->name('home')->middleware('verified'); // route for login

0 个答案:

没有答案