src/Models/Session.php
public function scopeGuestsBySeconds(Builder $builder, $seconds = 60): Builder
    {
        return $builder->where('last_activity', '>=', time() - $seconds)->whereNull('user_id');
    }
public function scopeGuestsBySeconds(Builder $builder, $seconds = 60): Builder
    {
        return $builder->where('last_activity', '>=', time() - $seconds)->whereNull('user_id');
    }
public function scopeGuestsBySeconds ( Builder $ builder , $ seconds = 60 ) : Builder { return $ builder -> where ( 'last_activity' , '>=' , time ( ) - $ seconds ) -> whereNull ( 'user_id' ) ; }
Constrain the query to retrieve only sessions of guests who
have been active within the specified number of seconds.

@param \Illuminate\Database\Eloquent\Builder $builder
@param int                                   $seconds

@return \Illuminate\Database\Eloquent\Builder
Constrain the query to retrieve only sessions of guests who have been active within the specified number of seconds .