diff --git a/README.md b/README.md index 4c33a20..6d3a4e7 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,39 @@ php artisan vendor:publish --tag="duckmode-filament-assets" ## Usage -Um, I think it auto-adds itself to the default Filament Admin Panel dashboard. +### Adding Duck Mode to your admin panel +Firstly, register the plugin with your panel. It's easy, don't be shy, just open the relevant FilamenttPHP +Panel Provider, and add the plugin file. + +```php +use Sonjaturo\DuckmodeFilament\DuckmodeFilamentPlugin; +... +public function panel(Panel $panel): Panel +{ + return $panel + ... + ->plugin(DuckmodeFilamentPlugin::make()); +} +``` + +### Feeder Widget +Add the Feeder Widget to anywhere in your FilamentPHP dashboard by appending it to the `widgets` array in +your panel's configuration. + +```php +use Sonjaturo\DuckmodeFilament\FeederWidget; +... +public function panel(Panel $panel): Panel +{ + return $panel + ... + ->widgets([ + Widgets\AccountWidget::class, + Widgets\FilamentInfoWidget::class, + FeederWidget::class, + ]); +} +``` ## Testing diff --git a/src/DuckmodeFilamentPlugin.php b/src/DuckmodeFilamentPlugin.php index 76076b2..b3e7d6b 100644 --- a/src/DuckmodeFilamentPlugin.php +++ b/src/DuckmodeFilamentPlugin.php @@ -19,7 +19,6 @@ public function register(Panel $panel): void $panel ->widgets([ ...$panel->getWidgets(), - FeederWidget::class, ]); }