diff --git a/app/controllers/AuthController.php b/app/controllers/AuthController.php index f314a37..eb493d2 100644 --- a/app/controllers/AuthController.php +++ b/app/controllers/AuthController.php @@ -25,7 +25,7 @@ public function __construct() */ public function login(Request $request): Response { - return $this->viewWithoutLayout('auth/login'); + return $this->view('auth/login'); } /** @@ -33,7 +33,7 @@ public function login(Request $request): Response */ public function signup(Request $request): Response { - return $this->viewWithoutLayout('auth/signup'); + return $this->view('auth/signup'); } /** diff --git a/app/controllers/BaseController.php b/app/controllers/BaseController.php index a9e557a..2457119 100644 --- a/app/controllers/BaseController.php +++ b/app/controllers/BaseController.php @@ -46,22 +46,4 @@ protected function redirect(string $url): Response $response->setHeader('Location', $url); return $response; } - - protected function viewWithoutLayout(string $view, array $data = []): Response - { - extract($data); - - ob_start(); - - $viewFile = APP_PATH . '/views/' . str_replace('.', '/', $view) . '.php'; - - if (!file_exists($viewFile)) { - throw new \Exception("View file not found: {$viewFile}"); - } - - include $viewFile; - $content = ob_get_clean(); - - return new Response($content); - } } \ No newline at end of file diff --git a/app/views/auth/login.php b/app/views/auth/login.php index 3307119..e045916 100644 --- a/app/views/auth/login.php +++ b/app/views/auth/login.php @@ -1,13 +1,9 @@ - - - - - - Login - GoPlay Sports Platform - - - - + +
@@ -104,5 +100,3 @@ class="form-input"
- - diff --git a/app/views/auth/signup.php b/app/views/auth/signup.php index 35d0a0d..2391a50 100644 --- a/app/views/auth/signup.php +++ b/app/views/auth/signup.php @@ -1,13 +1,9 @@ - - - - - - Sign Up - GoPlay Sports Platform - - - - + +
@@ -154,7 +150,14 @@ class="form-input"
- +
+ +
- +
@@ -309,6 +326,4 @@ function showToast(message, type = 'info') { setTimeout(() => toast.remove(), 300); }, 4000); } - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/views/booking/book-coach.php b/app/views/booking/book-coach.php index 6c2fb59..70bbdd3 100644 --- a/app/views/booking/book-coach.php +++ b/app/views/booking/book-coach.php @@ -9,11 +9,11 @@