Skip to content

Commit

Permalink
Update service provider
Browse files Browse the repository at this point in the history
  • Loading branch information
andreia committed Jun 4, 2024
1 parent e8d6c5a commit 5389366
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/FilamentWebhookClientPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Filament\Contracts\Plugin;
use Filament\Panel;
use Illuminate\Support\Facades\Gate;

class FilamentWebhookClientPlugin implements Plugin
{
Expand All @@ -28,6 +27,6 @@ public function register(Panel $panel): void

public function boot(Panel $panel): void
{
Gate::policy(config('filament-webhook-client.models.webhook-call'), config('filament-webhook-client.policies.webhook-call'));
//
}
}
6 changes: 6 additions & 0 deletions src/FilamentWebhookClientServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Tapp\FilamentWebhookClient;

use Illuminate\Support\Facades\Gate;
use Spatie\LaravelPackageTools\Package;
use Spatie\LaravelPackageTools\PackageServiceProvider;

Expand All @@ -14,4 +15,9 @@ public function configurePackage(Package $package): void
->hasConfigFile()
->hasTranslations();
}

public function packageBooted(): void
{
Gate::policy(config('filament-webhook-client.models.webhook-call'), config('filament-webhook-client.policies.webhook-call'));
}
}

0 comments on commit 5389366

Please sign in to comment.