sakanjo / filament-reset-action
A Filament action to reset the form state.
Fund package maintenance!
sakanjo
Requires
- php: ^8.2
- filament/filament: ^3.2
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- laravel/pint: ^1.1
- orchestra/testbench: ^9.0
- pestphp/pest: ^2.3
- pestphp/pest-plugin-livewire: ^2.1
- phpstan/phpstan: ^1.1
This package is auto-updated.
Last update: 2024-12-21 15:03:34 UTC
README
A Filament action to reset the form state.
⨠Help support the maintenance of this package by sponsoring me.
Table of Contents
đĻ Install
composer require sakanjo/filament-reset-action
đĻ Usage
On the create page
<?php namespace App\Filament\Admin\Resources\UserResource\Pages; use App\Filament\Admin\Resources\UserResource; use Filament\Resources\Pages\CreateRecord; use SaKanjo\FilamentResetAction\Actions\ResetAction; class CreateUser extends CreateRecord { protected static string $resource = UserResource::class; protected function getHeaderActions(): array { return [ ResetAction::make(), ]; } }
On the edit page
<?php namespace App\Filament\Admin\Resources\UserResource\Pages; use App\Filament\Admin\Resources\UserResource; use App\Filament\Base\Pages\EditRecord; use SaKanjo\FilamentResetAction\Actions\ResetAction; class EditUser extends EditRecord { protected static string $resource = UserResource::class; protected function getHeaderActions(): array { return [ ResetAction::make(), ]; } }
đ Support the development
Do you like this project? Support it by donating
Click the "đ Sponsor" at the top of this repo.
Šī¸ Credits
đ License
MIT License Š 2023-PRESENT Salah Kanjo