Exemple #1
0
 /**
  * Return the killmails for a character
  *
  * @param int  $character_id
  * @param bool $get
  * @param int  $chunk
  *
  * @return
  */
 public function getCharacterKillmails(int $character_id, bool $get = true, int $chunk = 200)
 {
     $killmails = KillMail::select('*', 'character_kill_mails.characterID as ownerID', 'kill_mail_details.characterID as victimID')->leftJoin('kill_mail_details', 'character_kill_mails.killID', '=', 'kill_mail_details.killID')->leftJoin('invTypes', 'kill_mail_details.shipTypeID', '=', 'invTypes.typeID')->leftJoin('mapDenormalize', 'kill_mail_details.solarSystemID', '=', 'mapDenormalize.itemID')->where('character_kill_mails.characterID', $character_id);
     if ($get) {
         return $killmails->orderBy('character_kill_mails.killID', 'desc')->paginate($chunk);
     }
     return $killmails;
 }
 /**
  * Return the killmails for a character
  *
  * @param $character_id
  *
  * @return mixed
  */
 public function getCharacterKillmails($character_id)
 {
     return KillMail::select('*', 'character_kill_mails.characterID as ownerID', 'kill_mail_details.characterID as victimID')->leftJoin('kill_mail_details', 'character_kill_mails.killID', '=', 'kill_mail_details.killID')->leftJoin('invTypes', 'kill_mail_details.shipTypeID', '=', 'invTypes.typeID')->leftJoin('mapDenormalize', 'kill_mail_details.solarSystemID', '=', 'mapDenormalize.itemID')->where('character_kill_mails.characterID', $character_id)->get();
 }