Phpstorm For Laravel



  1. Phpstorm Laravel Method Where Not Found
  2. Phpstorm 9 Download
  3. Phpstorm Community
Laravel

The Laravel plugin assists with Blade templates including the new Laravel 5.4 update which includes slots and components.

Laravel Insight is a very helpful PhpStorm IDE plugin that introduces a lot of features when you are working with Laravel Framework. 29 845 downloads. November 6th, 2020 PestPHP has a plugin that adds support for using Pest inside of PhpStorm (written by Oliver Nybroe). This plugin adds conveniences to working with Pest, such as running a Pest test from the PhpStorm UI (like PHPUnit) and supports auto-completion.

Download the plugin for PhpStorm.

Go to Jetbrains and locate the plugin. https://plugins.jetbrains.com/idea/plugin/7532-laravel-plugin

Save to your computer somewhere and remeber where this is. Desktop is easy.

Add the plugin to PhpStorm

Go to settings > plugins and click the button down the bottom. ‘Install plugin from disk…’

Locate the plugin Laravel.jar you have saved somewhere and select and install it.

Phpstorm Laravel Method Where Not Found

Restart PhpStorm

Activate the plugin for your project.

Open the project you want to use the Laravel plugin for. Obviously this should be a Laravel project.

Settings > languages & frameworks > Php > Laravel

Check the ‘Enable plugin for this project’. Apply / OK.

Phpstorm 9 Download

And you are done.

Laravel & PHPStorm – the best of the two worlds. Laravel is the most popular PHP web framework today. PHPStorm is the best PHP IDE that money can buy. What’s sad is that there is still no built in support for Laravel in PHPStorm. I created an issue on YouTrack (Jetbrain’s issue tracker) a long time ago which has received quite a good number of votes by today. I do hope Laravel support will come soon on the IDE. Meanwhile, there are workarounds to get things done smoothly.

Auto Completion

Thanks to the massive class aliasing (& use of Facade) in the framework core, PHPStorm can’t provide true autocompletion for Laravel by default. But there are excellent packages like Laravel IDE Helper which can generate phpdocs from the framework source. It generates a file which the IDE can parse and use the generated codes to provide autocompletion.

Installation and usage is simple. First modify your composer.json to include it in the require section:

2
4
6
8
'IlluminateWorkbenchWorkbenchServiceProvider',
'BarryvdhLaravelIdeHelperIdeHelperServiceProvider',
),

Now you can do this in command line:

The command should generate a file named “_ide_helper.php” with the necessary codes. You might want to recreate the code cache from “File” > “Invalidate Caches / Restart”. When the IDE restarts, you should get code completion for most of the Laravel code.

Blade Syntax

Phpstorm laravel projectPhpstorm For LaravelPhpstorm

This one could be a bit tricky. But if you have installed Textmate bundles into Jetbrains IDEs, it’s actually simpler.

(1) Download the textmate bundle here – https://github.com/outofcontrol/Blade.tmbundle. If you download the zip, uncompress it to somewhere on your harddisk.

(2) From PHPStorm’s Settings window, go to TextMate Bundles. Add the bundle and apply the changes.

(3) Go to “File Types” settings. Select “File types supported via textmate bundles”. Add “*.blade.php” to that list. Apply the changes. Now try and open a blade file. It should work.

Phpstorm Community

(4) Additionally, if there’s horrible color scheme on blade files, go back to “Settings” > “TextMate Bundles”, assign the color schemes to Darcula. (In my case, I switched all to Dracula under the “TextMate Color Scheme” column. If you click an item under that column, you should get a pop up to select.)

Now the blade syntax should work fine with nice color scheme.