user()->can('create', Company::class); } public function rules() { //$this->sanitize(); $rules = []; $rules['name'] = 'required'; $rules['company_logo'] = 'mimes:jpeg,jpg,png,gif|max:10000'; // max 10000kb $rules['settings'] = new ValidSettingsRule(); return $rules; } }