previousUrl; } protected function mutateFormDataBeforeCreate(array $data): array { $data['company_id'] = Auth::user()->currentCompany->id; $data['enabled'] = (bool)$data['enabled']; $data['created_by'] = Auth::id(); return $data; } protected function handleRecordCreation(array $data): Model { return $this->handleRecordCreationWithUniqueField($data, new Tax(), 'type'); } }