TomasVotruba / bladestan

PHPStan analysis for Blade templates
https://tomasvotruba.com/blog/introducing-bladestan-phpstan-analysis-of-blade-templates/
MIT License
290 stars 14 forks source link

Test case for implicit loop context #54

Open AJenbo opened 1 year ago

AJenbo commented 1 year ago

This highlights the issue where variables created dynamically are not scoped in to @includes() automatically.

As a workaround users can change there code to:


@foreach($foos as $value)
    @include('loop', ['value' => $value])
@endforeach