How to apply Laravel Blade Icon To File Type

Using version 2021.3.2

Under "File Types" Blade files have their own orange icon attached to them to distinguish them from standard PHP files. However, when I wish to create a "New" Blade file under the the New dialogue box Blade is not available as a file type. This forces me to create a blade file using the PHP file type ie "myfile.blade.php" and consequently I end up with the purple PHP icon. Indeed, ALL my blade files have been given the purple PHP icon.  Under "recognised file types" I added ".blade.php"  but it had no effect.  

So - 

  1. How do I get Storm to attribute the Blade file icon to Blade files as seen  in "File Types"
  2.  How do I get Blade file available under the "New" dialogue. 

    Many Thanks !! 
2 comments
Comment actions Permalink

Hi there,

1. How do I get Storm to attribute the Blade file icon to Blade files as seen  in "File Types"

This is how it should for Blade files to have own icon (default settings):

Do you have such entry there?

If not -- check what you have for "PHP" and "File type auto-detected by file content" entries on the same screen. If you have something like "*.blade.php" or similar to that there then remove it.

 

2. How do I get Blade file available under the "New" dialogue.

You can create a File Template for that. Downside -- it will have a standard PHP file icon in the New menu (that's because it uses only the last part of the file extension, which is .php). But once a file created it will have a proper Blade icon (considering that the existing Blade files have it).

Settings (Preferences on macOS) | Editor | File and Code Templates

0
Comment actions Permalink

Thank you very much. It's all working now. I was 99% there, but I made a couple of simple mistakes. Like it has to be *.blade.php and not just .blade.php or the extention has to be blade.php not just php. 

0

Please sign in to leave a comment.