-1
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
@empty
@endfor
I have a table N pra N
of survey
and user
. would like a solution of the kind
@if($survey->users->contains('id',auth()->user()->id))
But I did not get results, I check it in blade
, someone has a solution?
You cannot mount a select to return only the data that fits in these cases?
– Darlei Fernando Zillmer