From 3751f797532d3cb40f0d7e7a7be5642b3409743d Mon Sep 17 00:00:00 2001 From: Tieme Alberts <52133032+sitenzo@users.noreply.github.com> Date: Tue, 28 Nov 2023 21:57:41 +0100 Subject: [PATCH] Update README.md --- README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 650857d..aeb9e53 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ public function panel(Panel $panel): Panel ### Sorting -By default, Quick Create will sort all the displayed options in descending order. This can be disabled should you choose. In which case they will be displayed in the order they are registered with Filament. +By default, Quick Create will sort all the displayed options in descending order by Label. This can be disabled should you choose. In which case they will be displayed in the order they are registered with Filament. ```php use Awcodes\FilamentQuickCreate\QuickCreatePlugin; @@ -101,6 +101,23 @@ public function panel(Panel $panel): Panel } ``` +### Sorting by recourse navigation + +By default, Quick Create will sort all the displayed options by Label. This can be changed to resource navigation sort should you choose. In which case they will be displayed in the order they are displayed in de navigation. + +```php +use Awcodes\FilamentQuickCreate\QuickCreatePlugin; + +public function panel(Panel $panel): Panel +{ + return $panel + ->plugins([ + QuickCreatePlugin::make() + ->sortBy('navigation'), + ]) +} +``` + ### Slide Overs By default, Quick Create will render simple resources in a standard modal. If you would like to render them in a slide over instead you may use the `slideOver()` modifier to do so.