saade / filament-laravel-log

Read Laravel logs from the Filament admin panel
https://filamentphp.com/plugins/saade-laravel-log
MIT License
94 stars 21 forks source link

isAuthorized not working #31

Closed webnitros closed 9 months ago

webnitros commented 1 year ago

Alternative solution for plugin extension

Improvement for using your page

webnitros commented 1 year ago

due to the fact that there is no support for expanding your own page

now I had to use the following code

use App\Filament\Plugins\Logs\Pages\ViewLog;
use Filament\Panel;
use Saade\FilamentLaravelLog\FilamentLaravelLogPlugin;

class FilamentLaravelLogPluginExted extends FilamentLaravelLogPlugin
{
    public function register(Panel $panel): void
    {
        if (! $this->isAuthorized()) {
            return;
        }

        $panel
            ->pages([
                ViewLog::class,
            ]);
    }
}

namespace App\Filament\Plugins\Logs\Pages;

use BezhanSalleh\FilamentShield\Traits\HasPageShield;

class ViewLog extends \Saade\FilamentLaravelLog\Pages\ViewLog
{
   use HasPageShield;
}
``
saade commented 9 months ago

replaced by 65b81f138d87d3053131d97fb1ee29faadd962cc