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