Tired of wiring “impersonate” routes or resetting passwords just to reproduce a bug? caesardev/laravel-login-command prints a signed login link from your terminal so you can open a browser and land in the user’s session. It respects your guards, redirects, and expires after a set time.
What it does
Generate a time-limited, signed URL for any user—by ID or by email—using your existing guard and redirect settings, with per-run overrides when needed. Keep the workflow in dev or staging, without UI hacks or lingering routes.
# Install
composer require caesardev/laravel-login-command
# (Optional) publish config and views
php artisan vendor:publish --tag="login-command-config"
php artisan vendor:publish --tag="laravel-login-command-views"
# Use: get a signed login link
php artisan login:link 1
php artisan login:link user@example.com
# Options
php artisan login:link 1 --guard=admin
php artisan login:link 1 --redirect=/dashboard
php artisan login:link 1 --expires=120
Defaults live in config/login-command.php
(expiration
, guard
, redirect_url
, route_name
, user_model
). The command prints a clickable URL; paste it into your browser and you’re in.