Setup vsCode for Laravel Development

Visual Studio Code(vsCode) is a highly customizable code editor. it can be taken next level if you configure it properly for specific use cases. In this post, we’ll setup vsCode for Laravel development.


PHP Intelephense

it’s a very much required extension if you want to do PHP development in vscode. Gives you proper autocompletion, error hinting, goto type definition, provides autocompletion based on docs comments, etc. It’s also provides you with WordPress code completion but by default not enabled.

Laravel Extra Intellisense

another required extension for good auto-completion. It will provide you with a better view, validation rules, ENV, configs, etc. auto-completion.

PHPDoc Generator

I found it good to regularly write docs for classes and functions. To get the PHPDoc Generator to generate a PHPDoc block, place the cursor on a line with a class, method, or property and press Control+Enter.

Laravel Blade formatted

It’ll auto-format blade files after saving.

Laravel Blade Snippets

Some essential snippets for Laravel blade files. For example, b:foreach will set foreach loop block, b:if-else will set if-else condition block. For more snippets, you may read the extension’s details.


.env file’s syntax highlighting.

Better Pest

The under-rated extension helps you to run pest tests from a file, under a test scope, and globally.

My personal keyboard shortcuts for these extensions

    "key": "alt+r",
    "command": ""
    "key": "cmd+k cmd+r",
    "command": ""
    "key": "alt+f",
    "command": ""
    "key": "cmd+k cmd+f",
    "command": ""

Below these videos, use alt+r to run a single test scope and entire file.

Pest Snippets

provides some snippets for quickly writing pest related common block of codes.

  • :pte to access all test() snippets.
  • :pti to access all it() snippets.
  • :pex to access the available expect() methods.


Istiaq Nirab

A highly skilled and proficient WordPress developer with over Three years of professional experience in all aspects of WordPress website creation, including design, plug-ins, and implementation. Results-driven individual contributor with a successful track record in exceeding expectations for web development initiatives

More Reading

Post navigation


Leave a Reply

Your email address will not be published. Required fields are marked *