Laravel use loops in blade and controller to run iterations. In addition to conditional statements, Blade provides simple directives for working with PHP's loop structures. Again, each of these directives functions identically to their PHP counterparts
All loops syntax which are used in laravel. This is a sample code for practice.
When using loops you may also skip the current iteration or end the loop using the @continue and @break directives:
While iterating through a foreach loop, a $loop variable will be available inside of your loop. This variable provides access to some useful bits of information such as the current loop index and whether this is the first or last iteration through the loop.
If you are in a nested loop, you may access the parent loop's $loop variable via the parent property:
Switch statements can be constructed using the @switch, @case, @break, @default and @endswitch directives