check(); } /** * Prepare the data for validation. * * @return void */ protected function prepareForValidation(): void { $this->merge([ 'direction' => $this->route('direction') === 'up' ? true : false ]); } /** * Get the validation rules that apply to the request. * * @return array|string> */ public function rules(): array { return [ 'direction' => 'required|boolean', ]; } }