- Syntax highlighting
- Quickly jump between start and end of the file
- Refresh log contents
- Clear log contents
- Search multiple files in multiple directories New in v1.1.0
- Ignore file patterns New in v1.1.0
You can install the package via composer:
composer require saade/filament-laravel-log
Just install the package and you're ready to go!
You can publish the config file with:
php artisan vendor:publish --tag="log-config"
This is the contents of the published config file:
<?php
return [
/**
* Secure the page behind a custom policy.
*/
'authorization' => false,
/**
* The directory(ies) containing the log files.
*/
'logsDir' => [
storage_path('logs'),
],
/**
* Files to ignore when searching for log files.
* Accepts wildcards eg: *.log
*/
'exclude' => [
//
],
/**
* Navigation group.
*/
'navigationGroup' => 'System',
/**
* Navigation sort.
*/
'navigationSort' => 1,
/**
* Navigation icon.
*/
'navigationIcon' => 'heroicon-o-document-text',
/**
* Navigation label.
*/
'navigationLabel' => 'Logs',
/**
* Navigation slug.
*/
'slug' => 'system-logs',
/**
* 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
];
If you would like to prevent certain users from accessing your page, you should enable authorization
in config
// config/filament-laravel-log.php
<?php
return [
/**
* Secure the page behind a custom policy.
*/
'authorization' => true,
];
and register an authorization callback inside of a ServiceProvider::boot()
method.
// app/Providers/AppServiceProvider.php
<?php
public function boot()
{
ViewLog::can(function (User $user) {
return $user->role === Role::Admin;
});
}
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
- Saade
- Laravel Forge - for the syntax highlighting theme
- ryangjchandler's Filament Log - based of for the authorization and multiple log files feature
- All Contributors
The MIT License (MIT). Please see License File for more information.