Skip to content

Commit

Permalink
Update post selection options in ManageFooter and ManageHeader to use…
Browse files Browse the repository at this point in the history
… 'name' instead of 'title'
  • Loading branch information
abdessamadbettal committed Dec 7, 2024
1 parent d5afa6b commit d7ccef9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/Filament/Clusters/Settings/Pages/ManageFooter.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public function form(Form $form): Form
})
->required(),
Select::make('post')
->options(fn() => \App\Models\Post::pluck('title', 'slug')->toArray())
->options(fn() => \App\Models\Post::pluck('name', 'slug')->toArray())
->visible(fn(Get $get): bool => $get('type') == 'post')
->live()
->afterStateUpdated(function (Set $set, $state) {
Expand Down
6 changes: 3 additions & 3 deletions app/Filament/Clusters/Settings/Pages/ManageHeader.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function form(Form $form): Form
})
->required(),
Select::make('post')
->options(fn() => \App\Models\Post::pluck('title', 'slug')->toArray())
->options(fn() => \App\Models\Post::pluck('name', 'slug')->toArray())
->visible(fn(Get $get): bool => $get('type') == 'post')
->live()
->afterStateUpdated(function (Set $set, $state) {
Expand Down Expand Up @@ -143,7 +143,7 @@ public function form(Form $form): Form
})
->required(),
Select::make('post')
->options(fn() => \App\Models\Post::pluck('title', 'slug')->toArray())
->options(fn() => \App\Models\Post::pluck('name', 'slug')->toArray())
->visible(fn(Get $get): bool => $get('type') == 'post')
->live()
->afterStateUpdated(function (Set $set, $state) {
Expand Down Expand Up @@ -205,7 +205,7 @@ public function form(Form $form): Form
$set('url', '/category/' . $state);
}),
Select::make('post')
->options(fn() => \App\Models\Post::pluck('title', 'slug')->toArray())
->options(fn() => \App\Models\Post::pluck('name', 'slug')->toArray())
->visible(fn(Get $get): bool => $get('type') == 'post')
->live()
->afterStateUpdated(function (Set $set, $state) {
Expand Down

0 comments on commit d7ccef9

Please sign in to comment.