Skip to content

Commit

Permalink
Merge pull request #19 from lara-zeus/fix-model
Browse files Browse the repository at this point in the history
use config for model in `ResourceLockResource`
  • Loading branch information
Jehizkia authored Aug 31, 2023
2 parents f1ac5d8 + 2c1f8ca commit c8c0e4c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/Resources/ResourceLockResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@

class ResourceLockResource extends Resource
{
protected static ?string $model = ResourceLock::class;

protected static ?string $navigationIcon = 'heroicon-o-lock-closed';

public static function getModel(): string
{
return config('resource-lock.models.ResourceLock', ResourceLock::class);
}

public static function form(Form $form): Form
{
return $form
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/ResourceLockResource/ManageResourceLocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ protected function getActions(): array
return [
Action::make(__('resource-lock::manager.unlock_all'))
->icon('heroicon-o-lock-open')
->action(fn () => ResourceLock::truncate())
->action(fn () => config('resource-lock.models.ResourceLock', ResourceLock::class)::truncate())
->requiresConfirmation(),
];
}
Expand Down

0 comments on commit c8c0e4c

Please sign in to comment.