Task 5 - pivot with extra fields

This commit is contained in:
PovilasKorop
2021-11-22 08:05:15 +02:00
parent 4ec2014369
commit 4707c593a0
8 changed files with 144 additions and 0 deletions
+14
View File
@@ -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>