merge([ 'title' => $this->title ?? sprintf('Panier du %s', Carbon::now()->format('d/m/Y')) ]); return auth()->check() and $this->ajax(); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return [ 'title' => 'required|min:1|max:255' ]; } }