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 740B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace App\Filament\Company\Resources\Banking\AccountResource\Pages;
  3. use App\Concerns\HandlesResourceRecordUpdate;
  4. use App\Filament\Company\Resources\Banking\AccountResource;
  5. use Filament\Resources\Pages\EditRecord;
  6. class EditAccount extends EditRecord
  7. {
  8. use HandlesResourceRecordUpdate;
  9. protected static string $resource = AccountResource::class;
  10. protected function getHeaderActions(): array
  11. {
  12. return [
  13. //
  14. ];
  15. }
  16. protected function getRedirectUrl(): ?string
  17. {
  18. return $this->previousUrl;
  19. }
  20. protected function mutateFormDataBeforeSave(array $data): array
  21. {
  22. $data['enabled'] = (bool) ($data['enabled'] ?? false);
  23. return $data;
  24. }
  25. }