PHP code example of bezhansalleh / filament-exceptions

1. Go to this page and download the library: Download bezhansalleh/filament-exceptions 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/ */

    

bezhansalleh / filament-exceptions example snippets


public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            \BezhanSalleh\FilamentExceptions\FilamentExceptionsPlugin::make()
        ]);
}



namespace App\Exceptions;

use BezhanSalleh\FilamentExceptions\FilamentExceptions;

class Handler extends ExceptionHandler
{
    ...

    public function register()
    {
        $this->reportable(function (Throwable $e) {
            if ($this->shouldReport($e)) {
                FilamentExceptions::report($e);
            }
        });

        ...
    }

'period' => now()->subWeek(), // 1 week
'period' => now()->subDay(), // 1 day
'period' => now()->subDays(3), // 3 days

    'exception_model' => Exception::class,



namespace App\Models;

use BezhanSalleh\FilamentExceptions\Models\Exception as BaseException;

class Exception extends BaseException
{

}
bash
php artisan exceptions:install
js
export default {
    content: [
        // ...
        './vendor/bezhansalleh/filament-exceptions/resources/views/**/*.blade.php', // Language Switch Views
    ],
    // ...
}
bash
php artisan vendor:publish --tag=filament-exceptions-translations