You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

EditAccount.php 674B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace App\Filament\Company\Resources\Banking\AccountResource\Pages;
  3. use App\Concerns\HandlePageRedirect;
  4. use App\Filament\Company\Resources\Banking\AccountResource;
  5. use Filament\Actions;
  6. use Filament\Resources\Pages\EditRecord;
  7. class EditAccount extends EditRecord
  8. {
  9. use HandlePageRedirect;
  10. protected static string $resource = AccountResource::class;
  11. protected function getHeaderActions(): array
  12. {
  13. return [
  14. Actions\DeleteAction::make(),
  15. ];
  16. }
  17. protected function mutateFormDataBeforeSave(array $data): array
  18. {
  19. $data['enabled'] = (bool) ($data['enabled'] ?? false);
  20. return $data;
  21. }
  22. }