laravel-blade-snippets-vscode icon indicating copy to clipboard operation
laravel-blade-snippets-vscode copied to clipboard

Not formatting @for and @php and also javascript in <script> tag correctly.

Open singh-jay opened this issue 5 years ago • 2 comments

@php $units = get_unit_data(); $rows = 5; if(!empty($installation_data)){ $default = array_pop($installation_data); $rows = count($installation_data); $last_index = ''; if(!empty(old('price'))){ $last_index = count(old('price')); $last_index -= 1; } } @endphp

@for ($i = 0; $i < $rows; $i++)

@endfor

and also for javascript i have to manually format it everytime. Otherwise it is working fine. Capture

singh-jay avatar Jan 07 '20 05:01 singh-jay

Try to use @for loop like this:

@foreach(range(0, $rows) as $i)
  Your HTML Code
@endforeach

1Caxz avatar Dec 03 '20 17:12 1Caxz

Any news on this? I also opened this issue #127 but no solution as of now.

sawirricardo avatar Mar 29 '21 04:03 sawirricardo