gammamatrix / playground-login-blade
Playground: Provides an API and a Laravel Blade UI for authentication, authorization, credential updates and user verification.
Installs: 304
Dependents: 9
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/gammamatrix/playground-login-blade
Requires
- php: ^8.4
- gammamatrix/playground-auth: dev-develop|dev-master|dev-feature/*|^74.0@dev|^74.0
- gammamatrix/playground-blade: dev-develop|dev-master|dev-feature/*|^74.0@dev|^74.0
- illuminate/view: ^12.0
Requires (Dev)
- gammamatrix/playground-test: dev-develop|dev-master|dev-feature/*|^74.0@dev|^74.0
- illuminate/testing: ^12.0
- phpunit/phpunit: ^12.3
This package is auto-updated.
Last update: 2025-09-15 20:56:25 UTC
README
The Playground Login Blade package for Laravel 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.
Installation
You can install the package via composer:
composer require gammamatrix/playground-login-blade
artisan about
Playground Login Blade provides configuration information in the artisan about
command.
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
You can publish the views file with:
php artisan vendor:publish --provider="Playground\Login\Blade\ServiceProvider" --tag="playground-view"
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
See the Email Verification Controller
- routes for email verification
- Middleware configuration:
config('playground-login-blade.middleware.auth')
Illuminate\Contracts\Auth\Authenticatable
Laravel\Sanctum\Contracts\HasApiTokens
Playground\Models\Contracts\Abilities
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\Models\Contracts\Admin
public function isAdmin(): bool;
Playground\Models\Contracts\Privileges
public function addPrivilege(mixed $privilege): void; public function hasPrivilege(mixed $privilege): bool; public function removePrivilege(mixed $privilege): void;
Playground\Models\Contracts\Role
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
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)
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
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
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
This package provides support for displaying a website map with the 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
If PLAYGROUND_LOGIN_BLADE_LAYOUT
is not set, it defaults to PLAYGROUND_BLADE_LAYOUT
from the base Playground Blade package.
env() | config() |
---|---|
PLAYGROUND_LOGIN_BLADE_LAYOUT |
playground-login-blade.layout |
PLAYGROUND_LOGIN_BLADE_VIEW |
playground-login-blade.view |
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
Tests at level 9 on:
config/
database/
resources/
src/
tests/Feature/
tests/Unit/
composer analyse
Coding Standards
composer format
Tests
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.