Skip to content

Commit

Permalink
resolve the model issue - ready for release - readme wip
Browse files Browse the repository at this point in the history
  • Loading branch information
bezhanSalleh committed Nov 6, 2024
1 parent bfba558 commit a6ed8f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/FilamentExceptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static function getCluster(): ?string

public static function getModel(): ?string
{
return static::$model; // ?? '\\BezhanSalleh\\FilamentExceptions\\Models\\Exception';
return static::$model;
}

public static function model(string $model): void
Expand Down
5 changes: 5 additions & 0 deletions src/FilamentExceptionsPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,15 @@ public function getId(): string

public function register(Panel $panel): void
{
if (is_null(FilamentExceptions::getModel())) {
FilamentExceptions::model('\\BezhanSalleh\\FilamentExceptions\\Models\\Exception');
}

$panel
->resources([
ExceptionResource::class,
]);

}

public function boot(Panel $panel): void {}
Expand Down

0 comments on commit a6ed8f2

Please sign in to comment.