Esempio n. 1
0
 /**
  * Return a Wallet Journal for a Corporation
  *
  * @param int  $corporation_id
  * @param bool $get
  * @param int  $chunk
  *
  * @return \Illuminate\Pagination\LengthAwarePaginator
  */
 public function getCorporationWalletJournal(int $corporation_id, bool $get = true, int $chunk = 50)
 {
     $journal = WalletJournal::leftJoin('eve_ref_types', function ($join) {
         $join->on('corporation_wallet_journals.refTypeID', '=', 'eve_ref_types.refTypeID');
     })->where('corporationID', $corporation_id);
     if ($get) {
         return $journal->orderBy('date', 'desc')->paginate($chunk);
     }
     return $journal;
 }
Esempio n. 2
0
 /**
  * Return a Wallet Journal for a Corporation
  *
  * @param                               $corporation_id
  * @param int                           $chunk
  * @param \Illuminate\Http\Request|null $request
  *
  * @return mixed
  * @throws \Seat\Services\Exceptions\FilterException
  */
 public function getCorporationWalletJournal($corporation_id, $chunk = 50, Request $request = null)
 {
     $journal = WalletJournal::leftJoin('eve_ref_types', 'corporation_wallet_journals.refTypeID', '=', 'eve_ref_types.refTypeID')->where('corporationID', $corporation_id);
     // Apply any received filters
     if ($request && $request->filter) {
         $journal = $this->where_filter($journal, $request->filter, config('web.filter.rules.corporation_journal'));
     }
     return $journal->orderBy('date', 'desc')->paginate($chunk);
 }