mirror of
https://github.com/10h30/Test-Eloquent-Relationships.git
synced 2026-06-05 15:07:42 +09:00
16 lines
246 B
PHP
16 lines
246 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Http\Controllers;
|
||
|
|
|
||
|
|
use App\Models\Team;
|
||
|
|
|
||
|
|
class TeamController extends Controller
|
||
|
|
{
|
||
|
|
public function index()
|
||
|
|
{
|
||
|
|
$teams = Team::with('users')->get();
|
||
|
|
|
||
|
|
return view('teams.index', compact('teams'));
|
||
|
|
}
|
||
|
|
}
|