Laravel Blade Syntax Highlighting In PHPstorm how?
Can some cool person help me get Laravel Blade templates to work for the syntax highlighting?
I found this: http://daylerees.com/2012/04/06/notable-blade-syntax-support-by-medalink/ but am not sure how to install it in PHPstorm thanks
Please sign in to leave a comment.
Hi Kevin,
I'm not sure how it supposed to work, but try this:
Now IDE should give you some syntax highlighting for *.blade files.
As I understand it treats such file as plain text and highlights only blade instructions.
In any case: http://youtrack.jetbrains.com/issue/WI-14172
This actually works. At the moment only for Laravel-3 Blade.
I have to use the ending ".blade", though, not ".blade.php", which would do nothing. Any idea how I can add ".blade.php" as a valid Blade-ending? Or will the native php parser and the blade parser conflict with each other?
Thanks!
Robert
I don't know why you say this works.
Using PHPStorm running 6.0.1, all I get from this plugin are problems. Yes, I have Textmate plugin installed and running too.
Screen goes completely black and white, where the Handlebars are inverted, that's it. ?:|
PhpStorm just doesn't have support for the latest stuff, this feels bad as I'm paying good money for this app to just be left in the dark by other text editors's.
Attachment(s):
screenshot_2013-05-12_17-03-44.png
Almost a year later.... is this still an issue? I'm starting to use laravel. I love it so much I'm planning to convert all the company's PHP to this framework. But I'm having a hella time with highlight, and intellsense. I do have the IDE helper file installed (though Composer) .
This is what i want: Blade highlighting and intellsense; Intellsense for Laravel in general (though the helper file helps with that a lot); SQL support for Laravel's ORM.
I've been using PHPStorm since version 1. I know it VERY well. The folks over on the Laravel forums tell me to use Sublime. Man, I'd hate to stop using PHPStorm.
Can a dev chime in here with any status for adding laravel support?
-Thanks.
As you can see here (http://youtrack.jetbrains.com/issue/WI-14172) the status of the issue is "In progress" and it can be taken literally. It is really in progress, we are working on it.
It's planned in 8.0 version: http://confluence.jetbrains.com/display/PhpStorm/PhpStorm+Development+Roadmap .
Thanks for the fast response. Can you tell me when you plan on releasing version 8?
EDIT: NVM. I follwed the link and got the info. Thanks.
PS: Ok after reading.. I can tough it out until the end of the year. PHPStorm is one of the finest IDE's I've ever used (a close second to VS). It's earned a little patience from me. :) Is there going to be early beta releases?
And thanks again.
You can find EAP versions here: http://confluence.jetbrains.com/display/PhpStorm/PhpStorm+Early+Access+Program .
Follow the updates on blog: http://blog.jetbrains.com/phpstorm/ to stay informed about new features in EAPs.
I don't think this is a fair solution.
I have PHPStorm 7.1, it is a very good product with a lot of features.
Mustache syntax has been around for a millenia, around about. Laravel has been around for years.
There are so many problems with PHPStorm and Laravel coding that it just makes me wonder what the developers of this platform use with PHP, because I'll bet that it's not Laravel.
eg. cannot set syntax highlight for ".blade.php" and a different option for ".php" just doesn't work.
Templates inherit vairables automatically via framework dependency injection, but the IDE has no knowledge of it. What can I do about it?? Who knows because the help is useless. Trying to find a work-around is just another 10 hours down the drain.
Intellisense for autoloaded stuff, doesn't work.
... and on it goes.
You don't think that it's fair to wait for already planned feature that is in progress for the next release version or what?
I do believe that developers of this platform don't use PHP.
And have you seen the first comment in this thread describing ide_helper?
To be fair, IDE Helper "barely" works (install it via composer so it will regenerate everytime you push to git).
There are Live Templates avaialble to use for Laravel/Blade available at https://github.com/koomai/phpstorm-laravel-live-templates. The only real bad thing is code hinting for css or js, if you are using layout pages. PHPStorm doesn't understand Laravels link tags. So something like {{HTML::style('css/bootstrap.css')}} isn't understood by PHpStorm (you won't even get the closing tags).
While I'm still using PHPStorm for certain things, for Laravel work I use Sublime Text (which you'd swear was built for Laravel). When the dev's add Laravel support (it's not in the EAP versions yet) I'll probbaly move back to PHPStorm.
The dev's BADLY need to come up with a system that allows us to write hooks for the various frameworks (hooks that actually work - not hacks like IDE Helper). Cause sooner or later, another framework will take the community by storm. And then we'll have to wait years again.
One last thing, Jetbrains read the community all wrong here. Laravel is HUGE. And is killing every other framework out there. I know people who have been writing Zend or Drupal for years that are moving to Laravel. The only thing that's keeping Laravel from conquring all is that it's not friendly with Windows. It'll run on Windows, but it takes a few hacks (and some praying to run under IIS). Jetbrains needs something like a "PHP Advisory"group - to keep them current. In fact, they should do that with every language they support and don't use themselves on a regular basis.