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

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