Must have Visual Studio Code Extensions for Laravel

Varun Verma
Feb 18 · 3 min read

Are you switching from PHP Storm, Web Storm or Sublime? I personally love JetBrains’ IDEs and of course Sublime is amazing. I used both of them for many years now. But when ever I go online I look at people’s working on Visual Studio Code everywhere. I see people who make tutorials are using Visual Studios Code. I said to myself I have to give it a try. So I downloaded Visual Studio Code.

Oh Man! It’s fast, if you don’t have it already, click here to get it.

Now I can only keep using it, if it’s adding value, plus it can do all of the things what PHP storm used to do. Turns out installing Visual Studios Code is not everything. We also need to install extensions which can do functions what we want. So let’s look at some extensions for Laravel which can make our life easier.

Key bindings

As we also use shortcuts for everything. We try to make less use of our mouse. Now Visual Studios Code comes with it’s own keybinding. You can can go to Preferences > Keyboard Shortcuts to see all key bindings. You can learn them again or you can double click on any shortcut and assign it a new one. But it’s time consuming and uncool. Luckily we have extension for this.

IntelliJ IDEA Keybindings

Install this if you are coming from Intellij’ IDEs.

Sublime Text Keymap and Settings Importer

Install this if you are coming from Sublime

By installing them, it will change all of your keyboard shortcuts to one’s, you used to use in other IDE.

PHP Intelephense

Wonderfull Extension to provide developers with essential functionality that makes coding enjoyable and productive.

Laravel Artisan

Another Productive Extension to run Laravel Artisan commands from within Visual Studio Code. You can use command palette to run php artisan commands, by default keyboard shortcut is cmd+shift+P on Mac or ctrl+shift+P on Windows.

Laravel 5 Snippets

I personally like this extension a lot. As it let us add Snippets of Laravel quickly. As you start type, it will start showing you suggestions.

Laravel Blade Snippets

Snippets for Laravel Blade.

Snippet Creator

IDEs like PHPStorm have some snippets built in and if you want to use them here in Visual Studio Code as well. Install this extension as it lets you create your own snippets in few seconds. One of the snippet I personally like is how we can just time pubf and press TAB and IDE will automatically convert it to:

public function () { }

PHP Namespace Resolver

Most of the errors of imports, will be taken care by extension we installed previously PHP Intelephense. But sometimes some import missing and we can either type it manually or we can use this extension to import the PHP file for us quickly.

Bonus

Material Theme

Visual Studio Code by default comes with beautiful design. But this extension can make it more minimal. I personally like Material Theme High Contrast version.

As a developer, my code editor is my most important tool. I wanted to make it productive as possible. If you know any extension which adds value and I missed it, please leave a comment below or ping me on Twitter.

Resources:

Download Visual Studio Code
Laracasts — Visual Studio Code for PHP Developers


Originally published at blog.flicher.net on February 18, 2019.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade