feat: make sidebar collapsible

This commit is contained in:
jon brookes 2026-01-07 16:11:33 +00:00
parent d187671a34
commit e56db6634b
2 changed files with 12 additions and 11 deletions

View file

@ -55,14 +55,14 @@ Full CRUD is already possible. This is amazing if you think how long this would
### slugify
```php
TextInput::make('title')
->required()
->reactive()
->afterStateUpdated(function ($state, $set): void {
$set('slug', Str::slug((string) $state));
}),
TextInput::make('slug')
->required(),
TextInput::make('title')
->required()
->reactive()
->afterStateUpdated(function ($state, $set): void {
$set('slug', Str::slug((string) $state));
}),
TextInput::make('slug')
->required(),
```
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
```php
RichEditor::make('content')
->columnSpanFull(),
RichEditor::make('content')
->columnSpanFull(),
```
to `RichEditr` gives us a 'tiptap' rich text editor