PHPackages                             nguyentranchung/filament-laravel-log - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. nguyentranchung/filament-laravel-log

ActiveLibrary[Admin Panels](/categories/admin)

nguyentranchung/filament-laravel-log
====================================

Access laravel.log file through Filament admin panel

3.x-dev(1y ago)01.8kMITPHPPHP ^8.2CI passing

Since Apr 7Pushed 1y agoCompare

[ Source](https://github.com/nguyentranchung/filament-laravel-log)[ Packagist](https://packagist.org/packages/nguyentranchung/filament-laravel-log)[ Docs](https://github.com/saade/filament-laravel-log)[ GitHub Sponsors](https://github.com/saade)[ RSS](/packages/nguyentranchung-filament-laravel-log/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

Filament Laravel Log
====================

[](#filament-laravel-log)

[![Latest Version on Packagist](https://camo.githubusercontent.com/dbcc7d633fd9bb0b47000f65f2e9f0f1e470b3e8a2c74d56b876c0c617287731/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73616164652f66696c616d656e742d6c61726176656c2d6c6f672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/saade/filament-laravel-log)[![Total Downloads](https://camo.githubusercontent.com/cc668eced76e4204ef916edd2feb065aaa0165f25fed08dd56d823bc2519422e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73616164652f66696c616d656e742d6c61726176656c2d6c6f672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/saade/filament-laravel-log)

 [![Banner](https://raw.githubusercontent.com/saade/filament-laravel-log/3.x/art/cover1.png)](https://raw.githubusercontent.com/saade/filament-laravel-log/3.x/art/cover1.png)

Features
========

[](#features)

- Syntax highlighting
- Light/ Dark mode
- Quickly jump between start and end of the file
- Refresh log contents
- Clear log contents
- Search multiple files in multiple directories
- Ignored file patterns

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require saade/filament-laravel-log:^3.0
```

Usage
-----

[](#usage)

Add the `Saade\FilamentLaravelLog\FilamentLaravelLogPlugin` to your panel config.

```
use Saade\FilamentLaravelLog\FilamentLaravelLogPlugin;

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

Configuration
-------------

[](#configuration)

### Customizing the navigation item

[](#customizing-the-navigation-item)

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

### Customizing the log search

[](#customizing-the-log-search)

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

### Authorization

[](#authorization)

If you would like to prevent certain users from accessing the logs page, you should add a `authorize` callback in the FilamentLaravelLogPlugin chain.

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

### Customizing the log page

[](#customizing-the-log-page)

To customize the log page, you can extend the `Saade\FilamentLaravelLog\Pages\ViewLog` page and override its methods.

```
use Saade\FilamentLaravelLog\Pages\ViewLog as BaseViewLog;

class ViewLog extends BaseViewLog
{
    // Your implementation
}
```

```
use App\Filament\Pages\ViewLog;

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

### Customizing the editor appearance

[](#customizing-the-editor-appearance)

Publish the config file:

```
php artisan vendor:publish --tag="log-config"
```

This is the contents of the published config file:

```
