function online_users($type) { $r = OnlineUser::join('autism_users', 'autism_users.id', '=', 'autism_online.id')->where('autism_users.type', '=', $type)->get(); return $r; }