user()->hasFeature(FEATURE_DOCUMENTS)) { return false; } if ($this->invoice && $this->user()->cannot('edit', $this->invoice)) { return false; } if ($this->expense && $this->user()->cannot('edit', $this->expense)) { return false; } return $this->user()->can('create', ENTITY_DOCUMENT); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return [ //'file' => 'mimes:jpg' ]; } }