Gass
Gass

Reputation: 9344

How to solve the @json Blade directive red underline on VSC?

This variables are working perfectly, I wonder why are they with a red underline. Anyone knows how to correct this?

enter image description here

Error msg

enter image description here

Upvotes: 1

Views: 425

Answers (2)

Jakub Míšek
Jakub Míšek

Reputation: 1050

PHP extension has full Laravel Blade support including @json completion and parameters IntelliSense.

PHP Tools Extension

Upvotes: 0

cednore
cednore

Reputation: 885

Since VSCode doesn't ship intellisense for [blade] template files in default, we need to install extra extensions for correct grammar checking and snippets support for .blade.php files. Here are some of them

  1. onecentlin.laravel-blade * works best for me onecentlin.laravel-blade
  2. cjhowe7.laravel-blade cjhowe7.laravel-blade

@Gass Hope this helps you.

Upvotes: 2

Related Questions