user()->can('edit', $this->company); } public function rules() { $rules = []; $rules['company_logo'] = 'mimes:jpeg,jpg,png,gif|max:10000'; // max 10000kb $rules['settings'] = new ValidSettingsRule(); $rules['industry_id'] = 'integer|nullable'; $rules['size_id'] = 'integer|nullable'; $rules['country_id'] = 'integer|nullable'; $rules['work_email'] = 'email|nullable'; $rules['portal_domain'] = 'url'; return $rules; } }