check(); } /** * Prepare the data for validation. * * @return void */ protected function prepareForValidation() { $this->merge([ 'status' => $this->status ? true : false, ]); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return [ 'title' => 'required|min:3|max:255', 'status' => 'required|boolean' ]; } /** * Get custom attributes for validator errors. * * @return array */ public function attributes() { return [ 'title' => \trans('titre'), 'status' => \trans('statut') ]; } }