From 0aa067b783ec3ba374380b82612eb876634c78f8 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 1 Apr 2021 13:27:08 +0300 Subject: Made index.php a router and added the basis of landing view and controller --- src/controllers/LandingController.php | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/controllers/LandingController.php (limited to 'src/controllers/LandingController.php') diff --git a/src/controllers/LandingController.php b/src/controllers/LandingController.php new file mode 100644 index 0000000..80e0b5b --- /dev/null +++ b/src/controllers/LandingController.php @@ -0,0 +1,9 @@ + Date: Thu, 1 Apr 2021 13:55:39 +0300 Subject: Implemented base controller --- src/controllers/BaseController.php | 27 +++++++++++++++++++++++++++ src/controllers/LandingController.php | 14 ++++++++++++-- src/index.php | 4 +--- 3 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 src/controllers/BaseController.php (limited to 'src/controllers/LandingController.php') diff --git a/src/controllers/BaseController.php b/src/controllers/BaseController.php new file mode 100644 index 0000000..fd4bedd --- /dev/null +++ b/src/controllers/BaseController.php @@ -0,0 +1,27 @@ +invoke(); + LandingController::invoke(); break; default: http_response_code(404); -- cgit v1.3.1-23-gd82d From 61feb28a1e49ea4dd50394d8b971055cd1eb2694 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 1 Apr 2021 14:00:30 +0300 Subject: Made base controller not abstract --- src/controllers/BaseController.php | 19 ++++++++++++++----- src/controllers/LandingController.php | 9 --------- 2 files changed, 14 insertions(+), 14 deletions(-) (limited to 'src/controllers/LandingController.php') diff --git a/src/controllers/BaseController.php b/src/controllers/BaseController.php index fd4bedd..2c2a647 100644 --- a/src/controllers/BaseController.php +++ b/src/controllers/BaseController.php @@ -1,5 +1,5 @@ Date: Sat, 3 Apr 2021 11:34:24 +0300 Subject: Made job offers show all info --- src/controllers/DashboardController.php | 6 ++++++ src/controllers/LandingController.php | 6 ++++++ src/views/dashboard.php | 2 +- src/views/landing.php | 2 +- 4 files changed, 14 insertions(+), 2 deletions(-) (limited to 'src/controllers/LandingController.php') 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 @@ 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 @@ id] = $company->name; + } include "views/landing.php"; } } diff --git a/src/views/dashboard.php b/src/views/dashboard.php index 2312419..9060317 100644 --- a/src/views/dashboard.php +++ b/src/views/dashboard.php @@ -1,6 +1,6 @@ id} {$job->title} + echo "{$job->id} {$job->title} {$job->description} " . self::$companies[$job->companyId] . " {$job->salary}
id}\"> diff --git a/src/views/landing.php b/src/views/landing.php index d794d93..1bd679c 100644 --- a/src/views/landing.php +++ b/src/views/landing.php @@ -2,7 +2,7 @@ id} {$job->title}
"; + echo "{$job->title} {$job->description} " . self::$companies[$job->companyId] . " {$job->salary}
"; } ?> -- cgit v1.3.1-23-gd82d