public function menus() : BelongsToMany
    {
        $pivotTable = config('admin.database.role_menu_table');

        $relatedModel = config('admin.database.menu_model');

        return $this->belongsToMany($relatedModel, $pivotTable, 'role_id', 'menu_id');
    }
public function menus() : BelongsToMany
    {
        $pivotTable = config('admin.database.role_menu_table');

        $relatedModel = config('admin.database.menu_model');

        return $this->belongsToMany($relatedModel, $pivotTable, 'role_id', 'menu_id');
    }
public function menus ( ) : BelongsToMany { $ pivotTable = config ( 'admin.database.role_menu_table' ) ; $ relatedModel = config ( 'admin.database.menu_model' ) ; return $ this -> belongsToMany ( $ relatedModel , $ pivotTable , 'role_id' , 'menu_id' ) ; }
A role belongs to many menus.

@return BelongsToMany
A role belongs to many menus .