• How do I have my class show "references" when the class is used inside Laravel blade files?
  • Inside my blade files I am using classes.
  • The class itself does NOT reference the blade code, it shows 0 references.
  • For example, inside blade I "use App\Helpers\Foo" but App\Helpers\Foo::BAR shows 0 references
<? namespace App\Helpers;
0 references
const BAR='bar'

The foobar.blade.php file I am

<?
use App\Helpers\Foo;
$x=Foo::BAR

    KenColvin Thank you for the question.

    If you refer to the code lenses (the grey text above the class), we have experimentally enabled it in blade files in the latest pre-release (v1.46.15428).

    We have also fixed a few related features in blade files in the pre-release version.

      16 days later
      • Still not seeing the references in blade files, example: resources/views/foo.blade.php
      • However, it is showing references in views storage directory storage/framework/views/blabla123.php
      • Actually, the class references should ignore storage/framework/views, what is the setting to ignore this directory?

        KenColvin

        1/ This may be caused by another extension that overrides Blade features.

        Please make sure, the editor is set to PHP language:

        If there's Blade, the editor is handled by a different extension. Note, that we'll be adding our features to those 3rd party Blade extensions in the future (once we're sure there are no compatibility issues).

        3/ We don't have a specific setting to ignore files from IntelliSense. You can exclude a directory from being indexed if using "files.exclude" setting, but it has too many side-effects.

          Write a Reply...