tidying up use declarations and making new journal page for testing

This commit is contained in:
2018-12-13 23:03:34 -06:00
parent d30a49141e
commit 95ae7d6587
2 changed files with 4 additions and 7 deletions

View File

@@ -27,11 +27,7 @@ class MoonsAdminController extends Controller
$dateInit = Carbon::now();
$date = $dateInit->subDays(30);
$journal = DB::select('SELECT amount, date, description, first_party_id FROM PlayerDonationJournals WHERE corporation_id=9829766 AND date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH)');
foreach($journal as $journ) {
$journ->first_party_id = $esi->GetCharacterName($journ->first_party_id);
}
$journal = DB::select('SELECT amount, date, reason, description FROM PlayerDonationJournals WHERE corporation_id=9829766 AND date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH)');
return view('moons.moonjournal')->with('journal', $journal);
}

View File

@@ -2,19 +2,20 @@
@section('content')
<div class="container col-md-12">
{{ var_dump($journal) }}
<table class="table table-striped">
<thead>
<th>Name</th>
<th>Date</th>
<th>Description</th>
<th>Reason</th>
<th>Amount</th>
</thead>
<tbody>
@foreach($journal as $journ)
<tr>
<td>{{ $journ->first_party_id }}</td>
<td>{{ $journ->date }}</td>
<td>{{ $journ->description }}</td>
<td>{{ $journ->reason }}</td>
<td>{{ $journ->amount }}</td>
</tr>
@endforeach