1 year ago
#73251

Abdan Syakuro
Laravel 8 behaviour Logout itself
My web application has a strange/weird behaviour. Whenever i log-in into the apps, everything fine. After click few times menu, it gets logout. My apps is running well without any weird that behaviour in development local.
Route::group(['middleware' => 'auth'], function () {
Route::group(['prefix' => 'app','as' => 'app.'],function(){
......
i use default auth middleware from laravel. i also change session driver from file
to database
but still have a problem with that weird behaviour of logout. My applications used to put in the shared hosting, and right now moved into the cloud. I have no issue before in shared hosting. But after moving into the cloud this is what happens.
note: i also have try change the cookies name but still got nothing.
here is the config session file
<?php
use Illuminate\Support\Str;
return [
'driver' => env('SESSION_DRIVER', 'file'),
'lifetime' => env('SESSION_LIFETIME', 120),
'expire_on_close' => false,
'encrypt' => false,
'files' => storage_path('framework/sessions'),
'connection' => env('SESSION_CONNECTION', null),
'table' => 'sessions',
'store' => env('SESSION_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'),
'http_only' => true,
'same_site' => 'lax',
];
php
laravel
session
0 Answers
Your Answer