Skip to content

Commit

Permalink
Made Required Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
abbasmashaddy72 committed Mar 20, 2024
1 parent 36c5b74 commit a0a8b7b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion config/curator.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@
],
'multi_select_key' => 'metaKey',
'table' => [
'layout' => 'list',
'layout' => 'grid',
]
];
8 changes: 4 additions & 4 deletions src/CuratorPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class CuratorPlugin implements Plugin

protected ?bool $shouldRegisterNavigation = null;

protected ?string $defaultListView = null;
protected ?string $getDefaultListView = null;

protected string | Closure | null $pluralLabel = null;

Expand Down Expand Up @@ -105,9 +105,9 @@ public function shouldRegisterNavigation(): ?bool
return $this->shouldRegisterNavigation ?? config('curator.should_register_navigation');
}

public function defaultListView(): ?string
public function getDefaultListView(): ?string
{
return $this->defaultListView ?? config('curator.table.layout');
return $this->getDefaultListView ?? config('curator.table.layout');
}

public function navigationGroup(string | Closure | null $group = null): static
Expand Down Expand Up @@ -147,7 +147,7 @@ public function registerNavigation(bool $show = true): static

public function defaultView(string $view): static
{
$this->defaultListView = $view;
$this->getDefaultListView = $view;

return $this;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/MediaResource/ListMedia.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ListMedia extends ListRecords

public function boot()
{
$this->layoutView = CuratorPlugin::get()->defaultListView();
$this->layoutView = CuratorPlugin::get()->getDefaultListView();
}

protected $listeners = [
Expand Down

0 comments on commit a0a8b7b

Please sign in to comment.