In this article we are going to look at how to make VSCode ready for Laravel/PHP Development. If we organized a poll to determine what text editors found most favorable for development purposes, VSCode will probably be one of the top ones. VSCode is an open-source text-editor built by Microsoft for developers. Out of the \[…\]
In this article we are going to look at how to make VSCode ready for Laravel/PHP Development.
If we organized a poll to determine what text editors found most favorable for development purposes, VSCode will probably be one of the top ones.
VSCode is an open-source text-editor built by Microsoft for developers. Out of the box, VSCode has a lot of desirable features but sometimes, we need to tweak it to our specification.
One of the best parts of VSCode has to be the plugin system. This allows for developers to make add-ons which they wished came with VSCode and upload them to the market place for other developers to use
When building applications, we are going to be making a lot of new files and this extension is here for just that. Instead of having to open the file explorer to create new files, by clicking Ctrl + Alt + N
you trigger the prompt that lets you specify the file path of the file you want to create and the name of the file itself. This saves you a lot of time in the long run when you get used to it.
/
, as in directory/
to create the directory.files.exclude
settings.advancedNewFile.exclude
settings to workspace settings just like native files.exclude
, except it explicitly affects the AdvancedNewFile plugin only.advancedNewFile.``convenienceOptions
.This extension will mainly come in handy when you want to rename, duplicate, move or delete files and directories. Here, you no longer have to open the file explorer in the sidebar to perform these actions.
To use the File Utils
, you just need to run Ctrl + P
and then type File
and the options will pop-up for you to decide what you want to do with the file in question.
Intelephense offers fast code completion with detailed suggestions and rapid workspace-wide go to definition support. This extension saves you the stress of having to remember every little bit of what you are trying to type as the intellisense feature works really well out of the box.
This package gives Laravel snippets for us to use in VSCode when building our applications. Instead of typing out longer Laravel commands, you just use prefixes like: Auth
, Cache
, Config
, Route
, Mail
, View
etc. More prefixes are shown on the view page of the extension.
Laravel Blade Snippets offers blade snippets and blade syntax highlight support for VSCode. It consists of a set of triggers that, when typed, give the respective blade snippets. This also makes your blade templating easier and faster.
The Laravel Artisan extension makes running artisan
commands a breeze when using Laravel. To use it, you just need to trigger the VSCode command palette by pressing Ctrl+Shift+P
and then typing Artisan
and the artisan commands will show up to be executed.
Most developers dread Vim before they actually get a hang of it (I was scared too, you can get lost easily). Once you get a hang of Vim, you’ll definitely find your life a lot easier as traversing and editing your files become a lot faster for you.
If you’re looking to get started with vim, launch your terminal
and run the command:
1vimtutor
Once you run through the tutorial, you’ll definitely have a fun time using vim.
Ever tried asking for help and someone looks at your code and is like “ah! Your code is ugly”. Everyone loves beautiful code and this extension helps you to align your code. Don’t be that person with misaligned code blocks.
Usage: Highlight code block and enter Ctrl+Alt+a
or Ctrl+cmd+a
if you’re a Mac user.
These extensions have been shown to be useful when developing Laravel/PHP applications.