PHPackages                             gammamatrix/playground-login-blade - 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. gammamatrix/playground-login-blade

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

gammamatrix/playground-login-blade
==================================

Playground: Provides an API and a Laravel Blade UI for authentication, authorization, credential updates and user verification.

0366PHPCI passing

Since Aug 15Pushed 2w ago1 watchersCompare

[ Source](https://github.com/gammamatrix/playground-login-blade)[ Packagist](https://packagist.org/packages/gammamatrix/playground-login-blade)[ RSS](/packages/gammamatrix-playground-login-blade/feed)WikiDiscussions develop Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Playground Login Blade
======================

[](#playground-login-blade)

[![Playground CI Workflow](https://github.com/gammamatrix/playground-login-blade/actions/workflows/ci.yml/badge.svg?branch=develop)](https://raw.githubusercontent.com/gammamatrix/playground-login-blade/testing/develop/testdox.txt)[![Test Coverage](https://raw.githubusercontent.com/gammamatrix/playground-login-blade/testing/develop/coverage.svg)](tests)[![PHPStan Level 10 src and tests](https://camo.githubusercontent.com/022b70e6631d055205dfebf2aa7e53b3f63e7a3ea04a18e86429f279e29a29f1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c25323031302d627269676874677265656e)](.github/workflows/ci.yml#L128)

The Playground Login Blade package for [Laravel](https://laravel.com/docs/11.x) applications.

This package provides Authentication Controllers and Blade UI handling:

- Email Address Verification
- Password Management
- Authentication Supporting Roles, Privileges or Sanctum
- User Registration
- Supports logging out all devices with Sanctum.
- Provides API Tokens via Sanctum.

Read more on using [Playground Login Blade at Read the Docs: Playground Documentation.](https://gammamatrix-playground.readthedocs.io/en/develop/components/login.html)

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

[](#installation)

You can install the package via composer:

```
composer require gammamatrix/playground-login-blade
```

`artisan about`
---------------

[](#artisan-about)

Playground Login Blade provides configuration information in the `artisan about` command.

[![screenshot of artisan about command with Playground Login Blade.](resources/docs/artisan-about-playground-login-blade.png)](resources/docs/artisan-about-playground-login-blade.png)

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

[](#configuration)

If you need to customize the configuration, you can publish the config file with:

```
php artisan vendor:publish --provider="Playground\Login\Blade\ServiceProvider" --tag="playground-config"
```

See the contents of the published config file: [config/playground-login-blade.php](config/playground-login-blade.php)

You can publish the views file with:

```
php artisan vendor:publish --provider="Playground\Login\Blade\ServiceProvider" --tag="playground-view"
```

### User Model

[](#user-model)

Playground tries to support as many auth handling methods as possible.

Currently, the following contracts are used for various package features.

#### `Illuminate\Contracts\Auth\MustVerifyEmail`

[](#illuminatecontractsauthmustverifyemail)

See the [Email Verification Controller](src/Http/Controllers/EmailVerificationController.php)

- [routes for email verification](routes/verify.php)
- Middleware configuration: `config('playground-login-blade.middleware.auth')`

#### `Illuminate\Contracts\Auth\Authenticatable`

[](#illuminatecontractsauthauthenticatable)

#### `Laravel\Sanctum\Contracts\HasApiTokens`

[](#laravelsanctumcontractshasapitokens)

#### `Playground\Models\Contracts\Abilities`

[](#playgroundmodelscontractsabilities)

```
public function addAbility(mixed $ability): void;

public function hasAbility(mixed $ability): bool;

public function removeAbility(mixed $ability): void;
```

Abilities may be used with Sanctum. Abilities are included in `Playground\Models\User` with the trait:

- [playground - src/Models/Traits/Abilities.php](https://github.com/gammamatrix/playground/blob/develop/src/Models/Concerns/Abilities.php)

#### `Playground\Models\Contracts\Admin`

[](#playgroundmodelscontractsadmin)

```
public function isAdmin(): bool;
```

#### `Playground\Models\Contracts\Privileges`

[](#playgroundmodelscontractsprivileges)

```
public function addPrivilege(mixed $privilege): void;

public function hasPrivilege(mixed $privilege): bool;

public function removePrivilege(mixed $privilege): void;
```

#### `Playground\Models\Contracts\Role`

[](#playgroundmodelscontractsrole)

```
public function addRole(mixed $role): void;

public function hasRole(mixed $role): bool;

public function removeRole(mixed $role): void;
```

- **TODO** Move this info to the wikis.

### Environment Variables

[](#environment-variables)

#### Loading

[](#loading)

env()config()`PLAYGROUND_LOGIN_BLADE_LOAD_VIEWS``playground-login-blade.load.views``PLAYGROUND_LOGIN_BLADE_LOAD_ROUTES``playground-login-blade.load.routes`- `PLAYGROUND_LOGIN_BLADE_LOAD_ROUTES` must be enabled to load the routes in the application (unless published to your app - the control for this is in the [ServiceProvider.php](src/ServiceProvider.php))

#### Routes

[](#routes)

All routes are disabled by default in the base Playground package.

env()config()`PLAYGROUND_LOGIN_BLADE_ROUTES_CONFIRM``playground-login-blade.routes.confirm``PLAYGROUND_LOGIN_BLADE_ROUTES_FORGOT``playground-login-blade.routes.forgot``PLAYGROUND_LOGIN_BLADE_ROUTES_LOGIN``playground-login-blade.routes.login``PLAYGROUND_LOGIN_BLADE_ROUTES_LOGOUT``playground-login-blade.routes.logout``PLAYGROUND_LOGIN_BLADE_ROUTES_REGISTER``playground-login-blade.routes.register``PLAYGROUND_LOGIN_BLADE_ROUTES_RESET``playground-login-blade.routes.reset``PLAYGROUND_LOGIN_BLADE_ROUTES_TOKEN``playground-login-blade.routes.token``PLAYGROUND_LOGIN_BLADE_ROUTES_VERIFY``playground-login-blade.routes.verify`#### Middleware

[](#middleware)

The middleware values can be customized. See the default values on the command line with: `artisan about`

env()config()`PLAYGROUND_LOGIN_BLADE_MIDDLEWARE_AUTH``playground-login-blade.routes.auth``PLAYGROUND_LOGIN_BLADE_MIDDLEWARE_DEFAULT``playground-login-blade.routes.default``PLAYGROUND_LOGIN_BLADE_MIDDLEWARE_GUEST``playground-login-blade.routes.guest`#### Sessions

[](#sessions)

By default, authentication tokens will be saved in the session. Sessions use the Laravel `web` middleware.

env()config()`PLAYGROUND_LOGIN_BLADE_SESSION``playground-login-blade.routes.session`#### Sitemap

[](#sitemap)

This package provides support for displaying a website map with the [Playground Site Blade](https://github.com/gammamatrix/playground-site-blade) package.

env()config()`PLAYGROUND_LOGIN_BLADE_SITEMAP_ENABLE``playground-login-blade.sitemap.enable``PLAYGROUND_LOGIN_BLADE_SITEMAP_GUEST``playground-login-blade.sitemap.guest``PLAYGROUND_LOGIN_BLADE_SITEMAP_USER``playground-login-blade.sitemap.user``PLAYGROUND_LOGIN_BLADE_SITEMAP_VIEW``playground-login-blade.sitemap.view`#### UI

[](#ui)

If `PLAYGROUND_LOGIN_BLADE_LAYOUT` is not set, it defaults to `PLAYGROUND_BLADE_LAYOUT` from the base [Playground Blade](https://github.com/gammamatrix/playground-blade) package.

env()config()`PLAYGROUND_LOGIN_BLADE_LAYOUT``playground-login-blade.layout``PLAYGROUND_LOGIN_BLADE_VIEW``playground-login-blade.view`Cloc
----

[](#cloc)

```
composer cloc
```

```
➜  playground-login-blade git:(develop) ✗ composer cloc
> cloc --exclude-dir=output,vendor .
      76 text files.
      53 unique files.
      25 files ignored.

github.com/AlDanial/cloc v 1.98  T=0.08 s (698.4 files/s, 61178.1 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
PHP                             38            559            749           2005
Blade                            7             66              0            544
YAML                             1              5              0            275
XML                              2              0              2            144
Markdown                         3             72              0            140
JSON                             1              0              0             67
INI                              1              3              0             12
-------------------------------------------------------------------------------
SUM:                            53            705            751           3187
-------------------------------------------------------------------------------

```

PHPStan
-------

[](#phpstan)

Tests at level 9 on:

- `config/`
- `database/`
- `resources/`
- `src/`
- `tests/Feature/`
- `tests/Unit/`

```
composer analyse
```

Coding Standards
----------------

[](#coding-standards)

```
composer format
```

Tests
-----

[](#tests)

```
composer test
```

Changelog
---------

[](#changelog)

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

Credits
-------

[](#credits)

- [Jeremy Postlethwaite](https://github.com/gammamatrix)

License
-------

[](#license)

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

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance63

Regular maintenance activity

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity14

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/524724?v=4)[Jeremy Postlethwaite](/maintainers/gammamatrix)[@gammamatrix](https://github.com/gammamatrix)

---

Top Contributors

[![gammamatrix](https://avatars.githubusercontent.com/u/524724?v=4)](https://github.com/gammamatrix "gammamatrix (33 commits)")

### Embed Badge

![Health badge](/badges/gammamatrix-playground-login-blade/health.svg)

```
[![Health](https://phpackages.com/badges/gammamatrix-playground-login-blade/health.svg)](https://phpackages.com/packages/gammamatrix-playground-login-blade)
```

###  Alternatives

[kartik-v/yii2-password

Useful password strength validation utilities for Yii Framework 2.0

761.2M17](/packages/kartik-v-yii2-password)

PHPackages © 2026

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