ryangjchandler / filament-log
A simplistics log viewer for your Filament apps.
This package's canonical repository appears to be gone and the package has been frozen as a result.
Fund package maintenance!
ryangjchandler
Installs: 1 306
Dependents: 0
Suggesters: 0
Security: 0
Stars: 15
Watchers: 1
Forks: 1
Open Issues: 3
Requires
- php: ^8.0.2
- filament/filament: ^2.0
- illuminate/contracts: ^9.0
- spatie/laravel-package-tools: ^1.9.2
Requires (Dev)
- nunomaduro/collision: ^6.0
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^7.0
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.1
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: ^9.5
- spatie/laravel-ray: ^1.26
This package is auto-updated.
Last update: 2024-03-09 17:45:49 UTC
README
This package provides a Logs
page that allows you to view your Laravel log files in a simple UI.
Installation
You can install the package via Composer:
composer require ryangjchandler/filament-log
You can publish the config file with:
php artisan vendor:publish --tag="filament-log-config"
Optionally, you can publish the views using
php artisan vendor:publish --tag="filament-log-views"
This is the contents of the published config file:
return [ 'pages' => [ RyanChandler\FilamentLog\Logs::class, ], 'paths' => [ storage_path('logs') ], ];
Usage
You should first publish the assets provided by this plugin:
php artisan vendor:publish --tag=filament-log-assets
This will publish the CSS files to public/vendor/filament-log
.
The Logs
page will be automatically registed with Filament and appear in your panel.
Authorization
If you would like to prevent certain users from accessing your page, you should register an authorization callback inside of a ServiceProvider::boot()
method.
public function boot() { Logs::can(function (User $user) { return $user->role === Role::Admin; }); }
This will prevent the navigation item from being registered.
Further customization
If you would like to customize the Logs
page, you can do so by extending the package's page e.g.
class Logs extends \RyanChandler\FilamentLog\Logs { protected static ?string $navigationGroup = 'System'; protected static ?int $navigationSort = 10; protected static ?string $slug = 'system/logs'; }
You should now register your own page in the filament-log
config file:
'pages' => [ App\Filament\Pages\Logs::class, ],
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.