app/Services/UserService.php
public function allLoggedIn(): Collection
    {
        return DB::table('user')
            ->join('session', 'session.user_id', '=', 'user.user_id')
            ->where('user.user_id', '>', 0)
            ->orderBy('real_name')
            ->select(['user.*'])
            ->distinct()
            ->get()
            ->map(User::rowMapper());
    }
public function allLoggedIn(): Collection
    {
        return DB::table('user')
            ->join('session', 'session.user_id', '=', 'user.user_id')
            ->where('user.user_id', '>', 0)
            ->orderBy('real_name')
            ->select(['user.*'])
            ->distinct()
            ->get()
            ->map(User::rowMapper());
    }
public function allLoggedIn ( ) : Collection { return DB :: table ( 'user' ) -> join ( 'session' , 'session.user_id' , '=' , 'user.user_id' ) -> where ( 'user.user_id' , '>' , 0 ) -> orderBy ( 'real_name' ) -> select ( [ 'user.*' ] ) -> distinct ( ) -> get ( ) -> map ( User :: rowMapper ( ) ) ; }
Get a list of all users who are currently logged in.

@return Collection
@return User[]
Get a list of all users who are currently logged in .