dashboard controller and view

This commit is contained in:
2019-10-13 18:49:05 -05:00
parent 2c4d0f03d6
commit a922675d21
2 changed files with 4 additions and 2 deletions

View File

@@ -23,6 +23,7 @@ class DashboardController extends Controller
//Declare array variable
$contracts = array();
$num = 0;
//Get the current amount of contracts availabe to the corporation for displaying on the dashboard with the relevant
//information such as pickup and destination, jumps, and profit margin.
@@ -61,11 +62,10 @@ class DashboardController extends Controller
];
array_push($contracts, $final);
$num++;
}
}
$num = sizeof($contracts);
return view('dashboard.dashboard')->with('contracts', $contracts)
->with('num', $num);
}

View File

@@ -12,6 +12,7 @@
</div>
</div>
<br>
@if($num > 0)
<div class="container">
<table class="table table-striped table-bordered">
<thead>
@@ -40,4 +41,5 @@
</tbody>
</table>
</div>
@endif
@endsection