laravel limit foreach
snippet in php

laravel limit foreach

user4412

@foreach ($element['subs']->slice(0, 10) as $item)
 ...Code
@endforeach