بنقرة واحدة
filament-log-viewer-development
Build and work with Filament Log Viewer plugin for Filament v5.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Build and work with Filament Log Viewer plugin for Filament v5.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | filament-log-viewer-development |
| description | Build and work with Filament Log Viewer plugin for Filament v5. |
| tags | ["filament","laravel","logs","developer-tool"] |
Use this skill when working with the Filament Log Viewer package - a Filament plugin to view and manage Laravel log files.
A developer-focused Laravel log viewer with stack trace inspection, built for Filament v3 to v5. Provides:
storage/logs/logs in your Filament panel after installationAlways use the correct package version for your Filament version:
| Package Version | Filament Version | PHP |
|---|---|---|
^2.x | v5 | ≥8.2 |
^1.x | v4 | ≥8.1 |
^0.x | v3 | ≥8.0 |
Use the ->authorize() method to control access to the Log Viewer page. You can pass a Closure that returns a boolean based on your authorization logic.
By default, the Log Viewer will be registered in the Filament sidebar navigation. You can disable this with ->registerNavigation(false) if you want to link to it directly without showing it in the sidebar.
You can customize the navigation group, icon, label, sort order, and URL using the respective methods: ->navigationGroup(), ->navigationIcon(), ->navigationLabel(), ->navigationSort(), and ->navigationUrl() respectively.
The ->pollingTime() method allows you to set how often the log table should refresh to show new log entries. You can specify this in seconds (e.g., '60s') or set it to null to disable polling.
LOG_ENABLE_DELETE=false in production to prevent accidental log deletion.// config/filament-log-viewer.php
'enable_delete' => env('LOG_ENABLE_DELETE', false),
Or in .env:
LOG_ENABLE_DELETE=false
->authorize() closure for access control - never leave it open to all users.FilamentLogViewer::make()
->authorize(fn (): bool => auth()->user()->is_admin);
File Size Limit: Adjust LOG_MAX_SIZE_KB based on available server memory. Default is 2MB.
Disable Polling: Set ->pollingTime(null) in production to reduce server load.
->pollingTime(null) // Disable auto-refresh in production
composer require achyutn/filament-log-viewer
use AchyutN\FilamentLogViewer\FilamentLogViewer;
return $panel
->plugins([
FilamentLogViewer::make(),
]);
use AchyutN\FilamentLogViewer\FilamentLogViewer;
FilamentLogViewer::make()
->authorize(fn (): bool => auth()->user()->is_admin)
->registerNavigation(true)
->navigationGroup('System')
->navigationIcon('heroicon-o-document-text')
->navigationLabel('Log Viewer')
->navigationSort(10)
->navigationUrl('/logs')
->pollingTime('60s');
FilamentLogViewer::make()
->authorize(fn (): bool => auth()->check() && auth()->user()->can('View:LogTable'));
php artisan vendor:publish --tag=filament-log-viewer-config
Then edit config/filament-log-viewer.php:
return [
'max_log_file_size' => env('LOG_MAX_SIZE_KB', 2048),
'enable_delete' => env('LOG_ENABLE_DELETE', true),
'enable_copy_markdown' => env('LOG_ENABLE_COPY_MARKDOWN', true),
'copy_markdown_levels' => explode(',', env('LOG_COPY_MARKDOWN_LEVELS', 'error')),
];
Control which log levels show the "Copy as Markdown" button:
// Only error logs (default)
LOG_COPY_MARKDOWN_LEVELS=error
// Multiple levels
LOG_COPY_MARKDOWN_LEVELS=error,mail,warning
// Or in config
'copy_markdown_levels' => ['error', 'mail'],
Available log levels: error, warning, critical, alert, emergency, info, notice, debug, mail
enable_delete in production - risks accidental log deletionauthorize() check - exposes logs to all users including customersmax_log_file_size without considering memory constraintscopy_markdown_levels for your use case - defaults to error only