我正在使用laravel blade文件,我想知道这种方法是否会减慢我的网站速度.
这是我的文件结构:
这是我的文件结构:
<div class="table-sections"> ... @include('elements/table',['name' => 'table1','blocks' => $blocks1]) ... @include('elements/table',['name' => 'table2','blocks' => $blocks2]) ... </div>
... @foreach($blocks as $block) ... @foreach($block['sections'] as $section) ... @foreach($section['rows'] as $row) ... @include('elements/row','row' => $row) ... @endforeach ... @endforeach ... @endforeach ...
... @foreach($row['attributes'] as $attribute) ... // Making the '<td>' elements with their respective attributes and html ... @endforeach ...
我有很多嵌套的’foreach’块控制部分,所以我想知道在这种情况下是否最好不使用刀片(例如row.blade.PHP文件)
你有什么建议?