diff --git a/app/Http/Controllers/CountryController.php b/app/Http/Controllers/CountryController.php index 37be30c4..49e68134 100644 --- a/app/Http/Controllers/CountryController.php +++ b/app/Http/Controllers/CountryController.php @@ -9,7 +9,7 @@ class CountryController extends Controller public function index() { // TASK: load the relationship average of team size - $countries = Country::withAvg('teams','size'); + $countries = Country::withAvg('teams','size')->get(); return view('countries.index', compact('countries')); }