Artesaos\Defender\Traits\HasDefender::getFreshRolesPermissions PHP Method

getFreshRolesPermissions() protected method

Get fresh permissions from database based on roles.
protected getFreshRolesPermissions ( ) : Collection
return Illuminate\Support\Collection
    protected function getFreshRolesPermissions()
    {
        $roles = $this->roles()->get(['id'])->pluck('id')->toArray();
        return app('defender.permission')->getByRoles($roles);
    }