Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

chris-lw's avatar

PHPStorm + Blade Components

What is the recommended way to stop PHPStorm complaining about my custom blade components?

I can click "Add x-button to custom HTML tags" but this has to be done an each individual component I believe.

It would be nice if PHPStorm was aware of what's in my resources/views/components directory and sub-directories.

Am i missing a plugin that handles this?

0 likes
16 replies
bugsysha's avatar

Just disable that unknown tag inspection for now.

chris-lw's avatar

I could do that - but the auto-complete on your custom blade components is nice.

chris-lw's avatar

In storm when you type <x it gives me an auto-complete list of all of my blade components.

This is super nice but I have to right click and add these all individually for it to remember them. I'm assuming they are stored on the project. My question was really querying whether there was a better way for storm to detect these? Or a bulk way to add them.

3 likes
bernhardh's avatar

I don't get autocompletition for it. I get autocomplete for @foreach, etc. but not for custom <x-... components?

1 like
MrMoto9000's avatar

Yes! Just installed it. Does everything I wanted. Perfect!

bugsysha's avatar

They are probably stored in .idea folder inside project root. Check there and use some snippet to insert new ones, or create some script which will read content of components folder and populate appropriate items in .idea folder.

kurucu's avatar

@chris-lw how have you got autocomplete for components working? I don't believe this happens out of the box! Very useful!

1 like
pieterdejong's avatar

I think this is enabled when you check these check-boxes. PHPStorm ->Settings -> Languages & frameworks -> php -> laravel There you can select "enable plugin for this project"

And of course have the laravel plugin installed

1 like
imran's avatar

<x-MY-COMPONENT></x-MY-COMPONENT> will have a small squiggle under it the first time you write it, which you can then add to "Custom HTML tags" so that the next time you type <x a list of the <x tags will display allowing you to select them.

Not exactly the nice autocomplete the old component/blade pathing gives you but better than nothing?

jlafleur's avatar

Just discovered Laravel Idea plugins ! Thanks for all who suggested it! I would complement by saying, you might also need AlpineJS support from another plugin "Alpine.js Support" then you are all se

1 like
stevemoretz's avatar

Just a 2023 update: The official Blade plugin still doesn't support that, and now Laravel Idea is paid.

Please or to participate in this conversation.