### Publish Config File Source: https://github.com/jeffersongoncalves/filament-sensible-defaults/blob/3.x/README.md Optionally publish the configuration file to `config/sensible-defaults.php`. Run after installation to customize the defaults. ```bash php artisan vendor:publish --tag=filament-sensible-defaults-config ``` -------------------------------- ### Install with Composer Source: https://github.com/jeffersongoncalves/filament-sensible-defaults/blob/3.x/README.md Install the package via Composer. Requires PHP and a Filament project. The version constraint `^3.0` targets Filament v5 (branch `3.x`). ```bash composer require jeffersongoncalves/filament-sensible-defaults:^3.0 ``` -------------------------------- ### Configuration File (config/sensible-defaults.php) Source: https://github.com/jeffersongoncalves/filament-sensible-defaults/blob/3.x/README.md Default configuration file. Each block is a boolean toggle; `auto_register` controls global auto-registration. The `formats` array customizes display formats for currency, dates, times, and locale. ```php return [ 'auto_register' => true, 'translate_labels' => true, 'action_defaults' => true, 'select_defaults' => true, 'datetime_defaults' => true, 'fileupload_defaults' => true, 'repeater_defaults' => true, 'form_defaults' => true, 'page_defaults' => true, 'table_defaults' => true, 'format_defaults' => true, 'formats' => [ 'currency' => 'brl', 'date_display_format' => 'M j, Y', 'iso_date_display_format' => 'L', 'datetime_display_format' => 'M j, Y H:i:s', 'iso_datetime_display_format' => 'LLL', 'number_locale' => null, 'time_display_format' => 'H:i:s', 'iso_time_display_format' => 'LT', ], ]; ``` -------------------------------- ### Run tests with composer test Source: https://github.com/jeffersongoncalves/filament-sensible-defaults/blob/3.x/README.md Runs the test suite for the package using Composer. Use this command to execute all tests defined in the project. ```bash composer test ``` -------------------------------- ### Register Plugin on PanelProvider Source: https://github.com/jeffersongoncalves/filament-sensible-defaults/blob/3.x/README.md Register the plugin explicitly on a PanelProvider when `auto_register` is set to `false` in the config. Use fluent methods like `selectDefaults(false)` to opt out of a block or `datetimeDefaults()` to keep one enabled. ```php use JeffersonGoncalves\Filament\SensibleDefaults\FilamentSensibleDefaultsPlugin; public function panel(Panel $panel): Panel { return $panel ->plugin( FilamentSensibleDefaultsPlugin::make() ->selectDefaults(false) // opt a block out fluently ->datetimeDefaults() // or keep one explicitly on ); } ``` -------------------------------- ### Fine-Grained Control Configuration Source: https://github.com/jeffersongoncalves/filament-sensible-defaults/blob/3.x/README.md Fine-grained control configuration. Each block's sub-array lets you disable a single item (e.g., `delete_action => false`) while keeping the rest of the block enabled. The block switch is a master gate: turning it off disables all sub-items regardless of their own settings. ```php return [ // ... 'actions' => [ 'action_group' => true, 'action' => true, 'create_action' => true, 'edit_action' => true, 'delete_action' => false, // opt DeleteAction out, keep everything else in action_defaults 'view_action' => true, ], 'select' => [ 'native' => true, 'selectable_placeholder' => true, 'searchable' => true, 'preload' => true, ], 'datetime' => [ 'seconds' => true, 'max_date' => true, ], 'repeater' => [ 'repeater' => true, 'builder' => true, ], 'form' => [ 'toggle_buttons' => true, 'text_input' => true, 'textarea' => true, ], 'page' => [ 'validation_notification' => true, 'sticky_form_actions' => true, ], 'table' => [ 'table' => true, 'image_column' => true, 'select_filter' => true, ], ]; ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.