laravel-devtools maintained by alireza-h
Description
:laravel devtools
Author
Last update
2023/08/09 10:35
(v1.x-dev)
Downloads
71
Tags
LaravelDevTools

Features
- Error Logger with ignition
- Commands panel
- DB Schema panel, MySql or SQLite
- Cache panel, flush cache tags and cache keys
- Mail catcher
- Impersonate; Login as another user
- Installed packages list
Installation
For Laravel <=9 check 1.x version
$ composer require alireza-h/laravel-devtools
Migration
Migrate tables
$ php artisan migrate
Publish
Publish configs
$ php artisan vendor:publish --tag="devtools.config"
Publish assets
$ php artisan vendor:publish --tag="devtools.assets"
Publish views to customize
$ php artisan vendor:publish --tag="devtools.views"
Custom Log Channel
Add devtools custom log channel to logging.php config file and use it
'devtools' => [
'driver' => 'custom',
'via' => \AlirezaH\LaravelDevTools\Lib\Monolog\MonologLogger::class,
]
...
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => ['single', 'devtools'],
'ignore_exceptions' => false,
],
...
]
Configuration
route_prefixdevtools panel base urluserslist of devtools panel credentials; username as key and password as valuecustom_menucustom menu items for devtools panel- Error Logger
- Mail Catcher
Error Logger
'error_logger' => [
'enabled' => true,
'engine' => 'db', // db | redis,
'error_count_to_notify' => [10, 100, 1000, 10000],
'clear_older_than' => 3600 * 72,
'types' => [
'warning' => [
'log_to_slack' => false,
'exceptions' => [
ClientException::class,
LaravelValidationException::class,
TokenMismatchException::class,
HttpException::class,
MethodNotAllowedHttpException::class,
AuthenticationException::class,
]
],
'not_found' => [
'log_to_slack' => false,
'exceptions' => [
ModelNotFoundException::class,
NotFoundHttpException::class,
]
],
],
'dont_log' => [ // don't log list of these exception types
AuthenticationException::class,
AuthorizationException::class,
HttpException::class,
HttpResponseException::class,
ModelNotFoundException::class,
SuspiciousOperationException::class,
TokenMismatchException::class,
ValidationException::class,
]
],
enabledenable or disable devtools error loggerenginestore logs inredisor indberror_count_to_notifyerror count boundaries to notify error in slackclear_older_thanclear error logs older than this value (in seconds)typescategorize error logs and define each type exceptionslog_to_slackenable or disable log to slack; you need to configure logging slack channel (LOG_SLACK_WEBHOOK_URLinlogging.phpconfig file)exceptionslist of exception classes
dont_logdon't log list of defined exception types
Mail Catcher
'mail_catcher' => [
'enabled' => true,
'envs' => [
'local',
'demo',
//'testing',
//'production',
],
],
enabledenable or disable mail catcherenvsapplication environments to catch mails
Dev Tools Panel
Navigate to http://localhost:8000/dev-tools
Create your own password (http://localhost:8000/dev-tools/password), add it to devtools.php config file:
'users' => [
'your_username' => 'your_hashed_password',
],
and use this credential for devtools panel