Update default post status to published and enforce unique group names

This commit is contained in:
F4ilji
2025-11-20 15:05:04 +05:00
parent de4f8e27b8
commit 56935abfc0
3 changed files with 4 additions and 3 deletions
@@ -96,7 +96,7 @@ class SlidesRelationManager extends RelationManager
})
->options(function (Forms\Get $get) {
if ($get('model_select') === 'Post') {
return Post::where('status', 'published')->pluck('title', 'id');
return Post::where('status', 'published')->orderBy('created_at', 'desc')->pluck('title', 'id');
}
if ($get('model_select') === 'Page') {
return Page::whereNotNull('title')->pluck('title', 'id');