Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isAuthorized not working #31

Closed
wants to merge 2 commits into from
Closed

isAuthorized not working #31

wants to merge 2 commits into from

Conversation

webnitros
Copy link

Alternative solution for plugin extension

Improvement for using your page

@webnitros
Copy link
Author

webnitros commented Oct 25, 2023

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
Copy link
Owner

saade commented Mar 3, 2024

replaced by 65b81f1

@saade saade closed this Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants