Laravel 5.5页面由于发送表单时的非活动错误而过期 [英] Laravel 5.5 The page has expired due to inactivity error while sending form
本文介绍了Laravel 5.5页面由于发送表单时的非活动错误而过期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用laravel 5.5,它告诉我该页面由于不活动而过期.请刷新并重试."这很尴尬,因为我从未遇到此错误.相同的代码,但laravel版本不同..
I'am using laravel 5.5 and it gives me that "The page has expired due to inactivity. Please refresh and try again." This is awkward because I never encounter this error. Same codes but different laravel version..
我的表格;
{!! Form::open(['url'=>'admin/save-social']) !!}
{{ Form::label('pinterest', 'Pinterest;', ['class' => 'control-label']) }}
{{ Form::text('pinterest', null, ['class' => 'form-control'])}}
{{ Form::label('linkedn', 'Linkedn;', ['class' => 'control-label'])}}
{{ Form::text('linkedn', null, ['class' => 'form-control'])}}
{{ Form::label('facebook', 'Facebook;', ['class' => 'control-label']) }}
{{ Form::text('facebook', null, ['class' => 'form-control']) }}
{{ Form::label('twitter', 'Twitter;', ['class' => 'control-label']) }}
{{ Form::text('twitter', null, ['class' => 'form-control']) }}
{{ Form::label('instagram', 'İnstagram;', ['class' => 'control-label']) }}
{{ Form::text('instagram', null, ['class' => 'form-control']) }}
{{ Form::submit('Save', ['class'=>'btn btn-success btn-lg btn-block']) }}
{!! Form::close()!!}
和config/session.php
<?php
return [
'driver' => env('SESSION_DRIVER', 'file'),
'lifetime' => 120,
'expire_on_close' => false,
'encrypt' => false,
'files' => storage_path('framework/sessions'),
'connection' => null,
'table' => 'sessions',
'store' => null,
'lottery' => [2, 100],
'cookie' => env(
'SESSION_COOKIE',
str_slug(env('APP_NAME', 'laravel'), '_').'_session'
),
'path' => '/',
'domain' => env('SESSION_DOMAIN', null),
'secure' => env('SESSION_SECURE_COOKIE', false),
'http_only' => true,
'same_site' => null,
];
推荐答案
由于这些命令已在注释中解决了您的问题,因此应将其写为答案.尝试使用这些命令,然后重新启动表单
Since these commands has solved your problem in the comments i should write it as an answer . Try these commands and start your form again
php artisan cache:clear
php artisan config:clear
php artisan route:clear
php artisan view:clear
这篇关于Laravel 5.5页面由于发送表单时的非活动错误而过期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文