Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bezhanSalleh authored Oct 10, 2024
1 parent 8e9f3cc commit 0426968
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ PanelSwitch::configureUsing(function (PanelSwitch $panelSwitch) {
});
```

### Panels `New(1.0.7)`
### Panels
By default all the panels available will be listed in the panel switch menu. But by providing an array of panel ids to the `panels()` method you can limit the panels that will be listed.

```php
Expand All @@ -255,7 +255,7 @@ PanelSwitch::configureUsing(function (PanelSwitch $panelSwitch) {
```
Then `panels()` method also accepts a closure that returns an array of panel ids. This is useful when you want to dynamically determine the panels that will be listed. The plugin will also validate the panels to ensure that they are valid filament panels. If any of the panels provided are invalid, the plugin will throw an `InvalidArgumentException`.

### Sort Order `New(1.0.7)`
### Sort Order
By default the panels will be listed in the order they were registered in `config/app.php`'s `providers` array or in the order they are provided through the `panels()` method. But you can opt-in to sort the panels either in `asc` or `desc` order via `sort()` method.
```php
PanelSwitch::configureUsing(function (PanelSwitch $panelSwitch) {
Expand Down Expand Up @@ -378,4 +378,4 @@ Please review [our security policy](../../security/policy) on how to report secu

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

0 comments on commit 0426968

Please sign in to comment.