I'm kind of new here, and not professional. Still, i look for solutions for me, and when i find i can, i help!
Got a little confused, maybe try to remember
foreach($entity as $a=> $b)
{
echo $a; // = "<fieldmame>" (name)
echo $b; // = <value> (john)
}
foreach($entity as $a)
echo $a; // = <value> (john);
then, doing blade you can also decide with if cycle
@foreach($entity as $key => $value)
@if ($something)
<p>Something is true! {{ $variable }} </p>
@else
<p>Something is false!</p>
@endif
@endforeach
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community