diff --git a/app/Http/Controllers/Dashboard/DashboardController.php b/app/Http/Controllers/Dashboard/DashboardController.php index 19023eaec..268645698 100644 --- a/app/Http/Controllers/Dashboard/DashboardController.php +++ b/app/Http/Controllers/Dashboard/DashboardController.php @@ -68,7 +68,7 @@ class DashboardController extends Controller $open = SRPShip::where([ 'character_id' => auth()->user()->character_id, 'approved' => 'Under Review' - ])->get(); + ])->get()->toArray(); } //See if we can get all of the closed and approved SRP requests @@ -80,7 +80,7 @@ class DashboardController extends Controller $approved = SRPShip::where([ 'character_id' => auth()->user()->character_id, 'approved' => 'Approved', - ])->take(10)->get(); + ])->take(10)->get()->toArray(); } //See if we can get all of the closed and denied SRP requests @@ -92,7 +92,7 @@ class DashboardController extends Controller $denied = SRPShip::where([ 'character_id' => auth()->user()->character_id, 'approved' => 'Denied', - ])->take(10)->get(); + ])->take(10)->get()->toArray(); } //Process all types of srp requests for the alt of the main and add to the main's page @@ -111,7 +111,7 @@ class DashboardController extends Controller $altOpen = SRPShip::where([ 'character_id' => $alt->character_id, 'approved' => 'Under Review', - ])->get(); + ])->get()->toArray(); //Add the alt's open requests to the open requests array array_push($open, $altOpen); } @@ -125,7 +125,7 @@ class DashboardController extends Controller $altApproved = SRPShip::where([ 'character_id' => $alt->character_id, 'approved' => 'Approved', - ])->take(5)->get(); + ])->take(5)->get()->toArray(); array_push($approved, $altApproved); } @@ -139,7 +139,7 @@ class DashboardController extends Controller $altDenied = SRPShip::where([ 'character_id' => $alt->character_id, 'approved' => 'Denied', - ])->take(5)->get(); + ])->take(5)->get()->toArray(); array_push($denied, $altDenied); } diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php index 32916fca8..c31bbb4f2 100644 --- a/resources/views/dashboard.blade.php +++ b/resources/views/dashboard.blade.php @@ -48,10 +48,10 @@ @foreach($open as $o) - {{ $o->fleet_commander_name }} - {{ $o->ship_type }} - {{ $o->loss_value }} - {{ $o->approved }} + {{ $o['fleet_commander_name'] }} + {{ $o['ship_type'] }} + {{ $o['loss_value'] }} + {{ $o['approved'] }} @endforeach @@ -86,11 +86,11 @@ @foreach($denied as $d) - {{ $d->fleet_commander_name }} - {{ $d->ship_type }} - {{ $d->loss_value }} - {{ $d->approved }} - {{ $d->notes }} + {{ $d['fleet_commander_name'] }} + {{ $d['ship_type'] }} + {{ $d['loss_value'] }} + {{ $d['approved'] }} + {{ $d['notes'] }} @endforeach @@ -124,10 +124,10 @@ @foreach($approved as $a) - {{ $a->fleet_commander_name }} - {{ $a->ship_type }} - {{ $a->loss_value }} - {{ $a->approved }} + {{ $a['fleet_commander_name'] }} + {{ $a['ship_type'] }} + {{ $a['loss_value'] }} + {{ $a['approved'] }} @endforeach