src/Traits/LaratrustUserTrait.php
public function permissions()
    {
        $permissions = $this->morphToMany(
            Config::get('laratrust.models.permission'),
            'user',
            Config::get('laratrust.tables.permission_user'),
            Config::get('laratrust.foreign_keys.user'),
            Config::get('laratrust.foreign_keys.permission')
        );

        if (Config::get('laratrust.use_teams')) {
            $permissions->withPivot(Config::get('laratrust.foreign_keys.team'));
        }

        return $permissions;
    }
public function permissions()
    {
        $permissions = $this->morphToMany(
            Config::get('laratrust.models.permission'),
            'user',
            Config::get('laratrust.tables.permission_user'),
            Config::get('laratrust.foreign_keys.user'),
            Config::get('laratrust.foreign_keys.permission')
        );

        if (Config::get('laratrust.use_teams')) {
            $permissions->withPivot(Config::get('laratrust.foreign_keys.team'));
        }

        return $permissions;
    }
public function permissions ( ) { $ permissions = $ this -> morphToMany ( Config :: get ( 'laratrust.models.permission' ) , 'user' , Config :: get ( 'laratrust.tables.permission_user' ) , Config :: get ( 'laratrust.foreign_keys.user' ) , Config :: get ( 'laratrust.foreign_keys.permission' ) ) ; if ( Config :: get ( 'laratrust.use_teams' ) ) { $ permissions -> withPivot ( Config :: get ( 'laratrust.foreign_keys.team' ) ) ; } return $ permissions ; }
Many-to-Many relations with Permission.

@return \Illuminate\Database\Eloquent\Relations\MorphToMany
Many - to - Many relations with Permission .