Summary Files Commits Branches @commit @diff @stats
path: root / src / controllers
diff options
context:
space:
mode:
2 files changed, 12 insertions, 0 deletions
-rw-r--r--src/controllers/DashboardController.php6
-rw-r--r--src/controllers/LandingController.php6
diff --git a/src/controllers/DashboardController.php b/src/controllers/DashboardController.php
index 5bd26d4..548f60b 100644
--- a/src/controllers/DashboardController.php
+++ b/src/controllers/DashboardController.php
@@ -1,11 +1,17 @@
<?php
include_once('controllers/BaseController.php');
include_once('models/JobOffer.php');
+include_once('models/Company.php');
include_once('controllers/EditOfferController.php');
class DashboardController extends BaseController {
+ public static $companies = array();
+
public static function get() {
$jobs = JobOffer::getAllFromDB();
+ foreach(Company::getAllFromDB() as $company) {
+ self::$companies[$company->id] = $company->name;
+ }
include "views/dashboard.php";
}
diff --git a/src/controllers/LandingController.php b/src/controllers/LandingController.php
index aa28505..ffa8644 100644
--- a/src/controllers/LandingController.php
+++ b/src/controllers/LandingController.php
@@ -1,10 +1,16 @@
<?php
include_once("models/JobOffer.php");
+include_once('models/Company.php');
include_once("controllers/BaseController.php");
class LandingController extends BaseController {
+ private static $companies = array();
+
public static function get() {
$jobs = JobOffer::getAllFromDB();
+ foreach(Company::getAllFromDB() as $company) {
+ self::$companies[$company->id] = $company->name;
+ }
include "views/landing.php";
}
}