mirror of
https://github.com/10h30/Test-Eloquent-Relationships.git
synced 2026-06-05 15:07:42 +09:00
Task 6 - average of the field
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Country;
|
||||
|
||||
class CountryController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
// TASK: load the relationship average of team size
|
||||
$countries = Country::all();
|
||||
|
||||
return view('countries.index', compact('countries'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user