diff --git a/app/Http/Controllers/CompanyController.php b/app/Http/Controllers/CompanyController.php index debf715a..5fca2c0b 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 = $company[0]->getFullUrl(); + $photo = $company->getMedia('photo')[0]->getFullUrl(); return view('companies.show', compact('company', 'photo')); }