mirror of
https://github.com/10h30/Test-Eloquent-Relationships.git
synced 2026-07-11 10:46:13 +09:00
Task 5 - pivot with extra fields
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
<ul>
|
||||
@foreach ($teams as $team)
|
||||
<li>
|
||||
{{ $team->name }}
|
||||
<ul>
|
||||
@foreach ($team->users as $user)
|
||||
{{ $user->name }}:
|
||||
position {{ $user->pivot->position }},
|
||||
started at {{ $user->pivot->created_at }}
|
||||
@endforeach
|
||||
</ul>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
Reference in New Issue
Block a user