PHP code example of alireza-h / laravel-devtools

1. Go to this page and download the library: Download alireza-h/laravel-devtools library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

alireza-h / laravel-devtools example snippets


'devtools' => [
    'driver' => 'custom',
    'via' => \AlirezaH\LaravelDevTools\Lib\Monolog\MonologLogger::class,
]

...

'channels' => [
    'stack' => [
        'driver' => 'stack',
        'channels' => ['single', 'devtools'],
        'ignore_exceptions' => false,
    ],
    
    ...
]

'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,
    ]
],

'mail_catcher' => [
    'enabled' => true,
    'envs' => [
        'local',
        'demo',
        //'testing',
        //'production',
    ],
],

'users' => [
    'your_username' => 'your_hashed_password',
],
bash
$ php artisan migrate
bash
$ php artisan vendor:publish --tag="devtools.config"
bash
$ php artisan vendor:publish --tag="devtools.assets"