Summary Files Commits Branches @commit @diff @stats
path: root / src / controllers / DashboardController.php
blob: 5bd26d46df874c52c120265527e8499f1748314b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
include_once('controllers/BaseController.php');
include_once('models/JobOffer.php');
include_once('controllers/EditOfferController.php');

class DashboardController extends BaseController {
	public static function get() {
		$jobs = JobOffer::getAllFromDB();
		include "views/dashboard.php";
	}

	public static function post() {
		switch($_POST['_method']) {
			case "get":
				EditOfferController::get();
				break;
			case "put":
				EditOfferController::put();
				break;
			case "delete":
				EditOfferController::delete();
				break;
		}
	}
}