['required', 'integer', 'exists:restaurant_riders,id'], 'force_assign' => ['boolean'], 'notes' => ['nullable', 'string', 'max:255'], ]; } /** * Get custom attributes for validator errors. */ public function attributes(): array { return [ 'rider_id' => 'rider', 'force_assign' => 'force assignment', ]; } /** * Prepare the data for validation. */ protected function prepareForValidation(): void { $this->merge([ 'force_assign' => $this->boolean('force_assign'), ]); } }