2024-12-27 02:06:32 +01:00
|
|
|
<?php
|
|
|
|
class DashboardController extends Controller {
|
|
|
|
public function index() {
|
2024-12-31 15:53:15 +01:00
|
|
|
$vehicle = new Vehicle();
|
|
|
|
$vehicles = $vehicle->getVehiclesByUser($_SESSION['user']['id']);
|
2024-12-27 02:06:32 +01:00
|
|
|
|
|
|
|
$this->view('dashboard/index', [
|
|
|
|
'title' => 'Dashboard',
|
2024-12-31 15:53:15 +01:00
|
|
|
'vehicles' => $vehicles,
|
2024-12-27 02:06:32 +01:00
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function reroute(){
|
|
|
|
$this->redirect('/dashboard');
|
|
|
|
}
|
|
|
|
}
|