user()->can('edit', $this->quote); } public function rules() { $rules = []; if($this->input('documents')) $rules['documents'] = 'file|mimes:html,csv,png,ai,jpeg,tiff,pdf,gif,psd,txt,doc,xls,ppt,xlsx,docx,pptx|max:2000000'; return $rules; } }