laravel blade foreach loop iteration code example
Example 1: foreach loop laravel
foreach($data as $key => $value)
{
dd($value);
}
Example 2: forach in larvel blade
@forelse ($array as $element)
// loop here
@empty
// is empty
@endforelse
foreach($data as $key => $value)
{
dd($value);
}
@forelse ($array as $element)
// loop here
@empty
// is empty
@endforelse