PHPackages                             karlmonson/laravel-magic - 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. karlmonson/laravel-magic

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

karlmonson/laravel-magic
========================

Laravel Magic is a passwordless authentication driver

0.2(6y ago)48143MITPHP

Since Dec 17Pushed 6y ago2 watchersCompare

[ Source](https://github.com/karlmonson/laravel-magic)[ Packagist](https://packagist.org/packages/karlmonson/laravel-magic)[ RSS](/packages/karlmonson-laravel-magic/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (4)Versions (3)Used By (0)

Laravel Magic
=============

[](#laravel-magic)

Laravel Magic is a passwordless authentication driver. Users receive a login link via email.

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

[](#installation)

Install via Composer:

```
composer require karlmonson/laravel-magic
```

The package service provider and facade will be automatically registered.

Setup
-----

[](#setup)

After installation, run migrations:

```
php artisan migrate
```

This will create a new table `magic_auth_requests` in your database.

Next, replace the default `AuthenticatesUsers` trait on your `LoginController` with the following:

```
use KarlMonson\Magic\Traits\AuthenticatesUsers;

class LoginController extends Controller
{
    use AuthenticatesUsers;

    ...
}
```

You'll also need to add the `Magical` trait to your user model:

```
use KarlMonson\Magic\Traits\Magical;

class User extends Authenticatable
{
    use Magical, Notifiable;

    ...
}
```

We suggest dropping the `password` column from your user table, or at least making it `nullable`.

Configuration
-------------

[](#configuration)

Next, in your `auth` config file, replace the 'users' driver with 'magic':

```
'providers' => [
    'users' => [
        'driver' => 'magic',
        'model' => App\User::class,
    ],
],
```

You may also specify an 'expire' option for Magic to use, this is how long login tokens will stay alive. The default is 10 if this is not specified.

```
'magic' => [
    'expire' => 10,
]
```

Credits
-------

[](#credits)

- [Karl Monson](https://github.com/karlmonson) - Author
- [Fast](https://fast.co) - Inspiration
- [Slack](https://slack.com) - Inspiration

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/karlmonson/laravel-magic/blob/master/LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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

Every ~20 days

Total

2

Last Release

2319d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2065702?v=4)[karlmonson](/maintainers/karlmonson)[@karlmonson](https://github.com/karlmonson)

---

Top Contributors

[![akramwahid](https://avatars.githubusercontent.com/u/1542863?v=4)](https://github.com/akramwahid "akramwahid (1 commits)")[![karlmonson](https://avatars.githubusercontent.com/u/2065702?v=4)](https://github.com/karlmonson "karlmonson (1 commits)")

### Embed Badge

![Health badge](/badges/karlmonson-laravel-magic/health.svg)

```
[![Health](https://phpackages.com/badges/karlmonson-laravel-magic/health.svg)](https://phpackages.com/packages/karlmonson-laravel-magic)
```

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k89.8M1.0k](/packages/spatie-laravel-permission)[laragear/two-factor

On-premises 2FA Authentication for out-of-the-box.

339785.3k8](/packages/laragear-two-factor)[yadahan/laravel-authentication-log

Laravel Authentication Log provides authentication logger and notification for Laravel.

416632.8k5](/packages/yadahan-laravel-authentication-log)[beyondcode/laravel-confirm-email

Add email verification to your Laravel projects.

55255.8k](/packages/beyondcode-laravel-confirm-email)[scaler-tech/laravel-saml2

SAML2 Service Provider integration for Laravel applications, based on OneLogin toolkit

2737.5k](/packages/scaler-tech-laravel-saml2)[alajusticia/laravel-logins

Session management in Laravel apps, user notifications on new access, support for multiple separate remember tokens, IP geolocation, User-Agent parser

2011.0k](/packages/alajusticia-laravel-logins)

PHPackages © 2026

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