previousUrl; } protected function mutateFormDataBeforeCreate(array $data): array { $data['enabled'] = (bool) $data['enabled']; return $data; } /** * @throws Halt */ protected function handleRecordCreation(array $data): Model { $user = auth()->user(); if (! $user) { throw new Halt('No authenticated user found'); } return $this->handleRecordCreationWithUniqueField($data, new Tax(), $user, 'type'); } }