Loop over and include Blade views simultaneously using @each in Laravel — Amit Merchant — A blog on PHP, JavaScript, and more
Sometimes, there comes a scenario where you want to loop over a collection or array and include Blade views based on the iteration of that collection/array. You can use @foreach and @include for this purpose but there’s a handy way using which you can simplify this process.
Loop over and include Blade views simultaneously using @each in Laravel — Amit Merchant — A blog on PHP, JavaScript, and more
Sometimes, there comes a scenario where you want to loop over a collection or array and include Blade views based on the iteration of that collection/array. You can use @foreach and @include for this purpose but there’s a handy way using which you can simplify this process.
https://www.amitmerchant.com/loop-over-and-include-blade-templates-using-each-in-laravel/