You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed a bug in Laravel that happens when using a single line @php directive followed by a @endphp tag anywhere in the template file. I created an issue on the laravel/framework repository but I was told it is a know issue for quite a while and there is no plan to fix it.
Because the default template files of Sage are using this syntax, it is impossible to use raw PHP inside the loop.
For example this would throw a compilation exception:
I would suggest to update the default template files with the multiline syntax so it doesn't happen. The short syntax is easier to read but at least the full one compiles correctly :)
Summary
I noticed a bug in Laravel that happens when using a single line
@php
directive followed by a@endphp
tag anywhere in the template file. I created an issue on the laravel/framework repository but I was told it is a know issue for quite a while and there is no plan to fix it.Because the default template files of Sage are using this syntax, it is impossible to use raw PHP inside the loop.
For example this would throw a compilation exception:
I would suggest to update the default template files with the multiline syntax so it doesn't happen. The short syntax is easier to read but at least the full one compiles correctly :)
I also suggested to the Laravel team to add a warning to the docs about this.
Additional context
No response
The text was updated successfully, but these errors were encountered: