From 4b8310070c41bbd2064228663904e0506b84786d Mon Sep 17 00:00:00 2001 From: Donald <154738239+DonaldFon@users.noreply.github.com> Date: Sat, 17 Aug 2024 22:25:39 +0800 Subject: [PATCH] Update CompanyController.php --- app/Http/Controllers/CompanyController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/CompanyController.php b/app/Http/Controllers/CompanyController.php index 12fcb81d..50d8ebf5 100644 --- a/app/Http/Controllers/CompanyController.php +++ b/app/Http/Controllers/CompanyController.php @@ -20,7 +20,7 @@ public function store(Request $request) public function show(Company $company) { // TASK: retrieve the full URL to the uploaded photo file, using Spatie Media Library - $photo = '???'; + $photo = $company->getMedia('companies')[0]->getFullUrl(); return view('companies.show', compact('company', 'photo')); }