// let's assume user_id is 5 DB::table('attendances') ->where('date_only', '=', $newdate) ->orderBy('logon','asc') ->pluck('user_id'); // "5"