What's up guys!
I developed a system locally and it worked perfectly. When I put the system on the web server it started to give this error.
The page has expired due to inactivity.
I would not like to put the routes as an exception from csrf. One reason is that the system will be accessed by several people
The server has the required permissions on the storage folder.
My head:
<meta name="csrf-token" content="{{csrf_token()}}"/>
My form looks like this:
<form id="login" role="form" method="post" autocomplete="off" action="{{route('postLogar')}}">
{{csrf_field()}}
<div class="col-md-12">
<div class="row">
<div class="col-xs-6 col-md-6">
<input type="text" id="nr_cpf" name="nr_cpf" class="form-control input-lg"
value="" placeholder="CPF" maxlength="11" onBlur="validarCPF(this.value);" required/>
</div>
<div class="col-xs-6 col-md-6">
<input type="text" id="nr_matricula" name="nr_matricula" class="form-control input-lg"
value="" placeholder="Matrícula" maxlength="8" style="text-transform: capitalize" required/>
</div>
</div>
<br>
<div class="row">
<div class="col-xs-6 col-md-6">
<input type="password" id="ds_senha" name="ds_senha" class="form-control input-lg"
value="" placeholder="Senha" minlength='10' maxlength="10" required/>
</div>
<div class="col-xs-6 col-md-6">
</div>
</div>
<br>
<div class="row">
<div class="col-xs-3 col-md-3">
</div>
<div class="col-xs-6 col-md-6">
<button class="btn btn-success btn-block btn-lg" type="submit">
Entrar
</button>
</div>
<div class="col-xs-3 col-md-3">
</div>
</div>
</div>
My route:
Route::post('/logar', 'ViewController@postLogar')->name('postLogar');
Session.php
'driver' => env('SESSION_DRIVER', 'file'),
'secure' => env('SESSION_SECURE_COOKIE', false),
'domain' => env('SESSION_DOMAIN', null),
I have other laravel systems running on that same web server and they all work normally. I have no idea what may be happening.