user()->can('edit', $this->recurring_quote); } public function rules() { $rules = []; if ($this->file('documents') && is_array($this->file('documents'))) { $rules['documents.*'] = $this->fileValidation(); } elseif ($this->file('documents')) { $rules['documents'] = $this->fileValidation(); } if ($this->file('file') && is_array($this->file('file'))) { $rules['file.*'] = $this->fileValidation(); } elseif ($this->file('file')) { $rules['file'] = $this->fileValidation(); } return $rules; } }