Skip to content

Commit

Permalink
Use Model from Config for Resource
Browse files Browse the repository at this point in the history
  • Loading branch information
iAmKevinMcKee authored Dec 24, 2024
1 parent f025911 commit 2d0e5a0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Resources/MailResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@

class MailResource extends Resource
{
protected static ?string $model = Mail::class;

protected static ?string $slug = 'mails';

protected static ?string $recordTitleAttribute = 'subject';
Expand All @@ -39,6 +37,11 @@ class MailResource extends Resource

protected static bool $shouldRegisterNavigation = true;

public static function getModel(): string
{
return config('mails.models.mail');
}

public static function getNavigationGroup(): ?string
{
return __('Mails');
Expand Down

0 comments on commit 2d0e5a0

Please sign in to comment.