2

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?

1 Answer 1

2

<?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.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for answering! I typed :php and it was inserted @php @endphp tag as you said. But when I type str_r the vscode is not autocompleting the functions started with str_r (for exemple str_replace() is one of them)
@LucasCamargo not every command with be auto-completed. You will have to add relevant extensions for that. Try to add PHP IntelliSense, PHP Intelephense and then try str_r...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.