colorlibhq/gentelella-laravel
Laravel package that integrates the Gentelella admin template, offering Blade layouts, dashboard views, and UI scaffolding to quickly build a responsive admin panel with common dashboard components and assets.
This package handles the account/auth surface of a Laravel app — sign-in, sign-out, and the account menu — and routes you back to sensible screens afterwards. Start here:
config/ for the published file before touching any auth code — the redirect targets and route names usually live there.php artisan route:list and filter for auth. — you should see the sign-in screen, the sign-out endpoint, and auth.home. Knowing which route name maps to which screen explains most of the package's behaviour.auth.home, which left you staring at the dashboard while signed out).Use the package's sign-out route rather than hand-rolling it. A POST to the package's logout route invalidates the session and now performs the correct redirect. Keep it inside your auth middleware group and keep CSRF protection on.
Drive sign-out from the account menu. The release's browser smoke test signs out via the account menu specifically, because that is the path real users take. Mirror that in your own tests: click the menu item, assert the redirect and the flash, don't just post() the route.
Assert against the sign-in route, not the previous destination. After v1.0.2 the correct post-sign-out assertion is a redirect to your sign-in route (and assertGuest()), not to auth.home:
$this->post(route('logout'))
->assertRedirect(route('login'))
->assertSessionHas('status');
$this->assertGuest();
Override the redirect through config, not by forking the controller. If your app genuinely needs a different landing page after sign-out (marketing page, locale-aware home), set it in the package config. Overriding the controller means you lose the session-clearing and flash behaviour the package maintains.
Wire the confirmation message into your layout. The flash message only appears if your blade layout renders the session status. Add the standard session('status') block to your auth layout so the "you have been signed out" notice is actually visible.
Test the negative case too. Sign out, then hit a protected route and assert you are bounced to sign-in. This catches the class of bug v1.0.2 fixed — a session that is cleared while the UI still looks signed in.
auth.home or a dashboard URL, they will now fail — and they were asserting the bug. Update them to expect the sign-in screen.auth.home is not a "signed-in only" route. It is reachable while signed out, which is exactly why redirecting there after logout was confusing rather than broken. Don't use auth.home as your proxy for "user is authenticated"; use auth()->check() or the auth middleware.php artisan route:clear and php artisan config:clear (or optimize:clear). Stale route/config caches are the most common reason a fixed redirect still behaves the old way.session('status'). The package sets it; your view has to show it.How can I help you explore Laravel packages today?