Level 1
https://laravel.com/docs/5.5/authentication#remembering-users I think this is want you want!
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi i have a beta cms for a blog and i want my users to not expire their session and to logout from my cms only when logout(like laracast).
I use the default auth laravel here is my session controller
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class SessionController extends Controller {
public function __construct()
{
$this->middleware('guest', ['except' => 'destroy']);
}
public function create()
{
return view('sessions.create');
}
public function store()
{
if (! auth()->attempt(request(['email', 'password']))) {
return back()->withErrors([
'message' => 'Wrong'
]);
}
return redirect('/');
}
public function destroy()
{
auth()->logout();
return redirect('/login');
}
}
https://laravel.com/docs/5.5/authentication#remembering-users I think this is want you want!
Please or to participate in this conversation.