Getting tired of always entering login details in local dev environments? This package adds a button to instantly login a user!
Installation
You can install the package via composer:
composer require quintenbuis/laravel-instant-login
You can publish the config file with:
php artisan vendor:publish --provider="Quintenbuis\InstantLogin\InstantLoginServiceProvider" --tag="instant-login-config"
You can publish the views with:
php artisan vendor:publish --provider="Quintenbuis\InstantLogin\InstantLoginServiceProvider" --tag="instant-login-views"
This is the contents of the published config file:
return [
// The model that needs to be signed in
'model' => \App\Models\User::class,
// The guard where it must be signed in at
'guard' => 'web',
// Route information
'route' => [
'name' => 'instant-login',
'url' => '/instant-login',
],
// The fallback url when there is no intended route stored
'redirect' => null,
];
Usage
Add the login button to your view with:
"><x-instant-login::button /> {{-- Adding custom classes --}} <x-instant-login::button class="bg-red-600" />