PHP code example of saade / filament-laravel-log

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

    

saade / filament-laravel-log example snippets


use Saade\FilamentLaravelLog\FilamentLaravelLogPlugin;

class AdminPanelProvider extends PanelProvider
{
    public function panel(Panel $panel): Panel
    {
        return $panel
            // ...
            ->plugin(
                FilamentLaravelLogPlugin::make()
            );
    }
}

FilamentLaravelLogPlugin::make()
    ->navigationGroup('System Tools')
    ->navigationLabel('Logs')
    ->navigationIcon('heroicon-o-bug-ant')
    ->navigationSort(1)
    ->slug('logs')

FilamentLaravelLogPlugin::make()
  ->logDirs([
      storage_path('logs'),     // The default value
  ])
  ->excludedFilesPatterns([
      '*2023*'
  ])

FilamentLaravelLogPlugin::make()
  ->authorize(
      fn () => auth()->user()->isAdmin()
  )

use Saade\FilamentLaravelLog\Pages\ViewLog as BaseViewLog;

class ViewLog extends BaseViewLog
{
    // Your implementation
}

use App\Filament\Pages\ViewLog;

FilamentLaravelLogPlugin::make()
  ->viewLog(ViewLog::class)



return [
    /**
     * Maximum amount of lines that editor will render.
     */
    'maxLines' => 50,

    /**
     * Minimum amount of lines that editor will render.
     */
    'minLines' => 10,

    /**
     * Editor font size.
     */
    'fontSize' => 12
];
bash
php artisan vendor:publish --tag="log-config"