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(5mo ago)461↓100%MITPHPPHP ^8.0CI passing

Since Oct 3Pushed 5mo 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 today

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

35

—

LowBetter than 81% of packages

Maintenance70

Regular maintenance activity

Popularity16

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

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

171d 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-authorize

A middleware to check authorization

20625.6k1](/packages/spatie-laravel-authorize)[caresome/filament-auth-designer

Transform Filament's default auth pages into stunning, brand-ready experiences

3711.7k1](/packages/caresome-filament-auth-designer)

PHPackages © 2026

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