PHP code example of phattarachai / laravel-exception-log

1. Go to this page and download the library: Download phattarachai/laravel-exception-log 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/ */

    

phattarachai / laravel-exception-log example snippets


'ignore' => [
    \Illuminate\Validation\ValidationException::class,
    \Illuminate\Auth\AuthenticationException::class,
    \Symfony\Component\HttpKernel\Exception\NotFoundHttpException::class,
    \Illuminate\Database\Eloquent\ModelNotFoundException::class,
],

Gate::define('viewExceptionLogs', fn ($user) => $user->isAdmin());
bash
php artisan vendor:publish --provider="Phattarachai\ExceptionLog\ExceptionLogServiceProvider" --tag="exception-log-migrations"
php artisan migrate
bash
php artisan vendor:publish --provider="Phattarachai\ExceptionLog\ExceptionLogServiceProvider" --tag="exception-log-config"
bash
php artisan model:prune --model="Phattarachai\ExceptionLog\Models\ExceptionLog"
bash
php artisan vendor:publish --provider="Phattarachai\ExceptionLog\ExceptionLogServiceProvider" --tag="exception-log-views"