Lucas Camargo
Lucas Camargo

Reputation: 31

How to make VSCode recognize php snippets when I code between <?php ?> in a blade type page?

I have Laravel Blade Snippets extension installed in my VSCode. But when I'm coding at a blade type page, if I use the php tag < ?php ?>, the VSCode doesn't autocomplete php code.

For example, in the code below, when I type str_r, it should autocomplete showing the functions started with str_r. In this case one of the options should be str_replace.

But instead, it does nothing.

Can someone help me?

Upvotes: 2

Views: 773

Answers (1)

Digvijay
Digvijay

Reputation: 8957

<?php ?> is not part of the blade snippets. @php @endphp is.

Simply type :php and press enter, this will insert @php @endphp tag and later it will be converted into <?php ?> when complied.

Upvotes: 2

Related Questions