From 598f215536724ff32326204b51638248e474cffd Mon Sep 17 00:00:00 2001 From: Ronald-pro <36841157+Ronald-pro@users.noreply.github.com> Date: Fri, 26 Jan 2024 13:26:36 +0300 Subject: [PATCH] revised the initial page and added facility directory --- app/Http/Controllers/Auth/LoginController.php | 2 +- app/Http/Controllers/DirectoryController.php | 28 +++ resources/views/auth/login.blade.php | 12 +- .../clients/adolescents_clients.blade.php | 189 ++++++++-------- resources/views/directory/search.blade.php | 211 ++++++++++++++++++ resources/views/landing/page.blade.php | 62 +++++ routes/web.php | 8 +- 7 files changed, 412 insertions(+), 100 deletions(-) create mode 100644 app/Http/Controllers/DirectoryController.php create mode 100644 resources/views/directory/search.blade.php create mode 100644 resources/views/landing/page.blade.php diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 83e1e32..1386965 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -40,7 +40,7 @@ protected function redirectTo() { Session::flash('statuscode', 'success'); return '/admin/dashboard'; }else { - return '/'; + return '/login'; } } /** diff --git a/app/Http/Controllers/DirectoryController.php b/app/Http/Controllers/DirectoryController.php new file mode 100644 index 0000000..c0be76d --- /dev/null +++ b/app/Http/Controllers/DirectoryController.php @@ -0,0 +1,28 @@ +successful()) { + + $apiData = $response->json(); + return response()->json($apiData); + } else { + + $errorData = $response->json(); + return response()->json(['error' => 'API request failed'], $response->status()); + } + } +} diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index daf8d59..4ee8ab7 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -12,6 +12,12 @@
+