Exemplo n.º 1
0
 /**
  * Retreive Wallet Journal Entries for a Character
  *
  * @param int  $character_id
  * @param bool $get
  * @param int  $chunk
  *
  * @return
  */
 public function getCharacterWalletJournal(int $character_id, bool $get = true, int $chunk = 50)
 {
     $journal = WalletJournal::leftJoin('eve_ref_types', 'character_wallet_journals.refTypeID', '=', 'eve_ref_types.refTypeID')->where('characterID', $character_id);
     if ($get) {
         return $journal->orderBy('date', 'desc')->paginate($chunk);
     }
     return $journal;
 }
Exemplo n.º 2
0
 /**
  * Retreive Wallet Journal Entries for a Character
  *
  * @param                          $character_id
  * @param int                      $chunk
  * @param \Illuminate\Http\Request $request
  *
  * @return mixed
  */
 public function getCharacterWalletJournal($character_id, $chunk = 50, Request $request = null)
 {
     $journal = WalletJournal::leftJoin('eve_ref_types', 'character_wallet_journals.refTypeID', '=', 'eve_ref_types.refTypeID')->where('characterID', $character_id);
     // Apply any received filters
     if ($request && $request->filter) {
         $journal = $this->where_filter($journal, $request->filter, config('web.filter.rules.character_journal'));
     }
     return $journal->orderBy('date', 'desc')->paginate($chunk);
 }