Merge pull request 'feat: make sidebar collapsible' (#6) from test/write-an-article into dev

Reviewed-on: https://codeberg.org/headshed/share-lt/pulls/6
This commit is contained in:
Jon Brookes 2026-01-07 17:15:21 +01:00
commit b033262bd7
2 changed files with 12 additions and 11 deletions

View file

@ -27,6 +27,7 @@ class AdminPanelProvider extends PanelProvider
{ {
return $panel return $panel
->default() ->default()
->sidebarCollapsibleOnDesktop()
->id('admin') ->id('admin')
->path('admin') ->path('admin')
->login() ->login()
@ -63,7 +64,7 @@ class AdminPanelProvider extends PanelProvider
{ {
FilamentView::registerRenderHook( FilamentView::registerRenderHook(
PanelsRenderHook::BODY_END, PanelsRenderHook::BODY_END,
fn (): string => \Illuminate\Support\Facades\Blade::render('@vite("resources/js/app.js")'), fn(): string => \Illuminate\Support\Facades\Blade::render('@vite("resources/js/app.js")'),
); );
} }
} }

View file

@ -55,14 +55,14 @@ Full CRUD is already possible. This is amazing if you think how long this would
### slugify ### slugify
```php ```php
TextInput::make('title') TextInput::make('title')
->required() ->required()
->reactive() ->reactive()
->afterStateUpdated(function ($state, $set): void { ->afterStateUpdated(function ($state, $set): void {
$set('slug', Str::slug((string) $state)); $set('slug', Str::slug((string) $state));
}), }),
TextInput::make('slug') TextInput::make('slug')
->required(), ->required(),
``` ```
adding reactive and afterStateUpdted to title automatically creates a safe slug adding reactive and afterStateUpdted to title automatically creates a safe slug
@ -76,8 +76,8 @@ For the user, this reduces error and confusion over what a url should be
just changing the TextInput for content just changing the TextInput for content
```php ```php
RichEditor::make('content') RichEditor::make('content')
->columnSpanFull(), ->columnSpanFull(),
``` ```
to `RichEditr` gives us a 'tiptap' rich text editor to `RichEditr` gives us a 'tiptap' rich text editor