This package allows you to login the developer associate actions (e.g.log views).
You can install this package via composer using this command:
composer require ageekdev/dev-loginThe package will automatically register itself.
After installing Dev Login, you may publish its assets using the dev:install Artisan command:
php artisan dev:installSetup new dev user account.
php artisan dev:userDev Login default login URI is the /dev/login.
Laravel official packages uses $request->user() to get the user in gate. The default guard is user guard. So You can use UseDevLoginGuard middleware to override this behaviour.
You must replace Authorize with UseDevLoginGuard middleware applied to Telescope routes in telescope.middleware config value.
config/telescope.php
<?php
- use Laravel\Telescope\Http\Middleware\Authorize;
+ use AgeekDev\DevLogin\Http\Middleware\UseDevLoginGuard;
use Laravel\Telescope\Watchers;
...
'middleware' => [
'web',
- Authorize::class,
+ UseDevLoginGuard::class,
],
...You must replace EnsureUserIsAuthorized with UseDevLoginGuard middleware applied to Vapor routes in vapor-ui.middleware config value.
config/vapor-ui.php
<?php
- use Laravel\VaporUi\Http\Middleware\EnsureUserIsAuthorized;
+ use AgeekDev\DevLogin\Http\Middleware\UseDevLoginGuard;
use Laravel\Telescope\Watchers;
...
'middleware' => [
'web',
- EnsureUserIsAuthorized::class,
+ UseDevLoginGuard::class,
],
...You can run the tests with:
composer testPlease see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.
