belongsToMany(Menu::class, 'role_accesses') ->withPivot('view', 'create', 'update', 'delete'); } public function serviceCategories() { return $this->belongsToMany(ServiceCategory::class, config('database.connections.mysql.database').'.role_service_categories'); } public function cityBranches() { return $this->belongsToMany(CityBranch::class, config('database.connections.mysql.database').'.role_city_branches')->withoutSyncBoot(); } public function siteProjects() { return $this->belongsToMany(SiteProject::class, config('database.connections.mysql.database').'.role_site_projects')->withoutSyncBoot(); } public function roleLevel() { return $this->belongsTo(Requirement::class, 'role_level_id')->withoutGlobalScopes(); } }