src/Database/Concerns/IsRole.php
public function users()
    {
        $relation = $this->morphedByMany(
            Models::classname(User::class),
            'entity',
            Models::table('assigned_roles')
        )->withPivot('scope');

        return Models::scope()->applyToRelation($relation);
    }
public function users()
    {
        $relation = $this->morphedByMany(
            Models::classname(User::class),
            'entity',
            Models::table('assigned_roles')
        )->withPivot('scope');

        return Models::scope()->applyToRelation($relation);
    }
public function users ( ) { $ relation = $ this -> morphedByMany ( Models :: classname ( User :: class ) , 'entity' , Models :: table ( 'assigned_roles' ) ) -> withPivot ( 'scope' ) ; return Models :: scope ( ) -> applyToRelation ( $ relation ) ; }
The users relationship.

@return \Illuminate\Database\Eloquent\Relations\MorphedByMany
The users relationship .