PHP code example of sonja-turo / duckmode-filament

1. Go to this page and download the library: Download sonja-turo/duckmode-filament library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sonja-turo / duckmode-filament example snippets


use Sonjaturo\DuckmodeFilament\DuckmodeFilamentPlugin;
...
public function panel(Panel $panel): Panel
{
    return $panel
        ...
        ->plugin(DuckmodeFilamentPlugin::make());
}

use Sonjaturo\DuckmodeFilament\Bread;
use Sonjaturo\DuckmodeFilament\BreadType;
use Sonjaturo\DuckmodeFilament\FeederWidget;
...
public function panel(Panel $panel): Panel
{
    return $panel
        ...
        ->widgets([
            Widgets\AccountWidget::class,
            Widgets\FilamentInfoWidget::class,
            FeederWidget::make([
                'starvationRate' => 1000,
                'bread' => new Bread(BreadType::White)
            ]),
        ]);
}

use Sonjaturo\DuckmodeFilament\Tables\Quaction;
...
public function table(Table $table): Table
{
    return $table
        ...
        ->actions([
            Quaction::make(),
        ]);
}
bash
php artisan vendor:publish --tag="duckmode-filament-assets"