From 33cce27d1f048fe0c0b4d3ecdf74dd7772f27008 Mon Sep 17 00:00:00 2001 From: jovialcore Date: Wed, 11 Oct 2023 15:13:47 +0100 Subject: [PATCH] adding the show page for companies --- app/Http/Controllers/CompanyController.php | 5 +- resources/views/admin/company/index.blade.php | 2 +- .../views/admin/company/showCompany.blade.php | 47 +++++++++++++++++++ routes/web.php | 2 + 4 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 resources/views/admin/company/showCompany.blade.php diff --git a/app/Http/Controllers/CompanyController.php b/app/Http/Controllers/CompanyController.php index 31f3b39..4023489 100644 --- a/app/Http/Controllers/CompanyController.php +++ b/app/Http/Controllers/CompanyController.php @@ -42,9 +42,10 @@ public function store(Request $request, Company $company): RedirectResponse return to_route('admin.company.index'); } - public function show(int $id): RedirectResponse + public function show(int $id): View { + $company = $this->companyService->showCompany($id); - return to_route('admin.company.show', $company); + return view('admin.company.show', $company); } } diff --git a/resources/views/admin/company/index.blade.php b/resources/views/admin/company/index.blade.php index d75b825..eebb182 100644 --- a/resources/views/admin/company/index.blade.php +++ b/resources/views/admin/company/index.blade.php @@ -39,7 +39,7 @@ class="avatar avatar-xs pull-up" title="Lilian Fuller">