PHPackages                             caesardev/laravel-login-command - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. caesardev/laravel-login-command

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

caesardev/laravel-login-command
===============================

A Laravel command to login as a user

1.0.0(10mo ago)483MITPHPPHP ^8.0CI passing

Since Oct 3Pushed 10mo agoCompare

[ Source](https://github.com/CaesarDev/laravel-login-command)[ Packagist](https://packagist.org/packages/caesardev/laravel-login-command)[ Docs](https://github.com/caesardev/laravel-login-command)[ GitHub Sponsors](https://github.com/CaesarDev)[ RSS](/packages/caesardev-laravel-login-command/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (10)Versions (2)Used By (0)

A Laravel command to login as a user
====================================

[](#a-laravel-command-to-login-as-a-user)

A Laravel package that generates secure, signed login links for authenticating users via the command line. Perfect for development, testing, or providing customer support access.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require caesardev/laravel-login-command
```

You can publish the config file with:

```
php artisan vendor:publish --tag="login-command-config"
```

This is the contents of the published config file:

```
return [
    'expiration' => 60,

    'guard' => null,

    'redirect_url' => '/',

    'route_name' => 'login-link',

    'user_model' => 'App\\Models\\User',
];
```

Usage
-----

[](#usage)

Generate a signed login link for a user by their ID:

```
php artisan login:link 1
```

Or by their email:

```
php artisan login:link user@example.com
```

The command will output a signed URL that you can click or copy and paste into your browser to authenticate as that user.

### Options

[](#options)

**--guard**: Specify the authentication guard to use

```
php artisan login:link 1 --guard=admin
```

**--redirect**: Specify where to redirect after login

```
php artisan login:link 1 --redirect=/dashboard
```

**--expires**: Set how many minutes the link remains valid (default: 60)

```
php artisan login:link 1 --expires=120
```

### Configuration

[](#configuration)

- **expiration**: Default number of minutes the login link is valid (default: 60)
- **guard**: Default authentication guard to use (default: null, uses default guard)
- **redirect\_url**: Default URL to redirect to after login (default: '/')
- **route\_name**: Name of the login route (default: 'login-link')
- **user\_model**: The User model class to use (default: 'App\\Models\\User')

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [hapidjus](https://github.com/hapidjus)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

31

—

LowBetter than 65% of packages

Maintenance54

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

308d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0d503e6128ed803216fa8998f2b466c48bdd0b87855595c7c228b91d1c79fc12?d=identicon)[hapidjus](/maintainers/hapidjus)

---

Top Contributors

[![hapidjus](https://avatars.githubusercontent.com/u/5553121?v=4)](https://github.com/hapidjus "hapidjus (18 commits)")

---

Tags

laravelCaesarDevlaravel-login-command

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/caesardev-laravel-login-command/health.svg)

```
[![Health](https://phpackages.com/badges/caesardev-laravel-login-command/health.svg)](https://phpackages.com/packages/caesardev-laravel-login-command)
```

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

13.0k107.5M1.6k](/packages/spatie-laravel-permission)[spatie/laravel-passkeys

Use passkeys in your Laravel app

4721.0M47](/packages/spatie-laravel-passkeys)[binaryk/laravel-restify

Laravel REST API helpers

679422.0k](/packages/binaryk-laravel-restify)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.8k](/packages/rawilk-profile-filament-plugin)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

46273.9k](/packages/harris21-laravel-fuse)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

25060.1k](/packages/vormkracht10-laravel-mails)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
