Download the PHP package josegus/laravel-quick-login without Composer
On this page you can find all versions of the php package josegus/laravel-quick-login. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download josegus/laravel-quick-login
More information about josegus/laravel-quick-login
Files in josegus/laravel-quick-login
Package laravel-quick-login
Short Description Quick auth & login
License MIT
Homepage https://github.com/josegus/laravel-quick-login
Informations about the package laravel-quick-login
Laravel Quick Login
A simple Laravel component that enables quick login functionality for development environments.
In short, it includes a blade component that you can include in your login view to:
- create new users and automatically log in as the created user, with one click
- select an existing user to log in, with one click
Installation
You can install the package via composer:
You can publish the config file with:
This will create the config/quick-login.php
file with the following options:
Optionally, you can publish the views using
Usage
Blade Component
The package includes a Blade component that you can use in any view:
The above code will use Laravel's default authentication model (App\Models\User
) and guard (web
).
Using a different guard
If your app uses a different guard, pass it as a parameter to the component:
Using factory states
To create new users, the package will use the factory defined in your auth model, so make sure your auth model uses the HasFactory
trait. You can pass an array of factory states that will be applied when the package creates new users:
Using extra model attributes
Alternatively, you can pass an array of properties that will be applied when the package creates new users:
Advanced Customization
Change the Displayed Attribute
By default, the user's email is displayed. You can change this in the configuration:
Testing
License
This package is open-source software licensed under the MIT license.
Security
⚠️ Warning: This package is designed for development environments only. It is not recommended for use in production.