Posts by Fábio Gilberto • 7 points
3 posts
-
-1
votes2
answers68
viewsQ: Check ID with a single foreach
I wonder if you have a certain id, without having to do two foreach @forelse($surveys as $survey) @forelse($survey->users as $user) @if($user->id == $auth()->user()) AÇÃO @empty @endfor…
-
-1
votes1
answer97
viewsQ: Blade view Support
There is some way to add a Count in the Blade. For in the interaction it returns 1 1 0 0 @forelse($surveys as $survey) <p> @forelse($survey->options as $option) {{…
-
0
votes1
answer92
viewsQ: Ternary Laravel Relationship
I’m creating a polling system where I have the following tables. A poll has several options. An option belongs only to a poll. A user can vote in multiple polls, but one option per poll. Soon I made…