Skip to content

Commit 1d7ef03

Browse files
scott graysonscott grayson
authored andcommitted
fix: set resource slug to 'library' for clean URL
1 parent 410ad83 commit 1d7ef03

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Resources/LibraryItemResource.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ class LibraryItemResource extends Resource
1616
{
1717
protected static ?string $model = LibraryItem::class;
1818

19+
protected static ?string $slug = 'library';
20+
1921
protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-folder';
2022

2123
protected static string|\UnitEnum|null $navigationGroup = 'Resource Library';
@@ -106,9 +108,9 @@ public static function getRelations(): array
106108
public static function getPages(): array
107109
{
108110
return [
109-
'index' => Pages\ListLibraryItems::route('/library'),
110-
'create' => Pages\CreateLibraryItem::route('/library/create'),
111-
'edit' => Pages\EditLibraryItem::route('/library/{record}/edit'),
111+
'index' => Pages\ListLibraryItems::route('/'),
112+
'create' => Pages\CreateLibraryItem::route('/create'),
113+
'edit' => Pages\EditLibraryItem::route('/{record}/edit'),
112114
];
113115
}
114116
}

0 commit comments

Comments
 (0)