Complete all tasks

This commit is contained in:
Thuan Bui
2025-04-05 09:33:22 +09:00
parent 3a95847a8b
commit 992d4ee1c2
4 changed files with 9 additions and 3 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ class CountryController extends Controller
public function index()
{
// TASK: load the relationship average of team size
$countries = Country::all();
$countries = Country::withAvg('teams', 'size')->get();
return view('countries.index', compact('countries'));
}