merge([ 'done' => $this->done ? true : false, 'comment' => $this->comment ?? '' ]); return $this->ajax() and auth('web')->check(); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return [ 'done' => 'required|boolean', 'comment' => 'required|string|max:255' ]; } }