naythukhant / laravel-dev-login
A laravel package to login during development with one click
Installs: 19
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/naythukhant/laravel-dev-login
This package is auto-updated.
Last update: 2025-12-12 01:55:17 UTC
README
When we are developing a laravel app, we might need to enter email + password combination to login to our system during development stage and that may make developer himself to be annoyed.
This package can help you to overcome those problems by providing the following component.
<x-dev-login identifier="someone@somewhere.com"/>
Once the user click the button generated by the x-dev-login component, you are authenticated as your desired user account.
You can also pass attributes to the components as following.
<x-dev-login identifier="heidi.connelly@example.net" identifier-column="email" redirect-url="{{route('home')}}" label="Login as heidi" guard="web" class="bg-primary" />
The definitions of the component attributes are as follows.
- identifier - value to be used to be authenticated (mostly user email)
- identifier-column - mysql column to be validated with identifier mentioned above.
- redirect-url - url to be redirected after authenticating the user
- label - label to show on button
- guard - guard to be used when trying to authenticate
- class - class for the component blade
Note
All the attributes listed above are optional and the very first user in the table will be used to be authenticated by default if no attribute is passed.
Installation
You can install the package via composer.
composer require naythukhant/laravel-dev-login
Optionally, you can publish the config file with:
php artisan vendor:publish --tag="dev-login"
Here is how to override the package.
<?php use NayThuKhant\LaravelDevLogin\Http\Controllers\DevLoginController; /*all the config are not getting from Env helper since this application should not be messing up the env file*/ return [ /*default route name to be redirected after logging in*/ "redirect_route_name" => null, /*controller for handling the request, invoke function of this controller will be called by default*/ "login_controller" => DevLoginController::class, /*default guard for authentication this guard is really important because it works together with application authentication config*/ "guard" => "web", /*default model to authenticate*/ "auth_model" => null, /*this middleware will be applied for the dev login route*/ "middleware" => 'web', /*this will define when to include things provided by this package*/ "allowed_environments" => ['local'] ];
#👌HAVE FUN👌