Example #1
0
 public function getWhoIsOn()
 {
     $accounts = Account::whereHas('destiny', function ($query) {
         $query->where('clanName', 'Panda Love');
     })->get();
     if (count($accounts) > 0) {
         $xboxclient = new XboxClient();
         $presence = $xboxclient->fetchAccountsPresence($accounts);
         $status = $xboxclient->prettifyOnlineStatus($presence, $accounts);
         return Response::json(['error' => false, 'msg' => $status]);
     } else {
         $this->_error('No Panda Love members were found');
     }
 }