src/Helper.php
public static function isInSameTeam($rolePermission, $team)
    {
        if (
            !Config::get('laratrust.use_teams')
            || (!Config::get('laratrust.teams_strict_check') && is_null($team))
        ) {
            return true;
        }

        $teamForeignKey = static::teamForeignKey();

        return $rolePermission['pivot'][$teamForeignKey] == $team;
    }
public static function isInSameTeam($rolePermission, $team)
    {
        if (
            !Config::get('laratrust.use_teams')
            || (!Config::get('laratrust.teams_strict_check') && is_null($team))
        ) {
            return true;
        }

        $teamForeignKey = static::teamForeignKey();

        return $rolePermission['pivot'][$teamForeignKey] == $team;
    }
public static function isInSameTeam ( $ rolePermission , $ team ) { if ( ! Config :: get ( 'laratrust.use_teams' ) || ( ! Config :: get ( 'laratrust.teams_strict_check' ) && is_null ( $ team ) ) ) { return true ; } $ teamForeignKey = static :: teamForeignKey ( ) ; return $ rolePermission [ 'pivot' ] [ $ teamForeignKey ] == $ team ; }
Check if a role or permission is attach to the user in a same team.

@param  mixed  $rolePermission
@param  \Illuminate\Database\Eloquent\Model  $team
@return boolean
Check if a role or permission is attach to the user in a same team .