Introduction
Visual Studio Code has become the go-to editor for Laravel developers, and for good reason—it's fast, extensible, and has an incredible ecosystem of extensions. But with thousands of extensions available, which ones actually move the needle for Laravel development?
After years of Laravel development across 100+ projects, we've refined our VS Code setup to a core set of extensions that deliver maximum productivity. These aren't just nice-to-haves—they're transformative tools that have saved thousands of development hours through intelligent autocomplete, instant error detection, and automated workflows.
1. Laravel Extra Intellisense – Supercharged Autocomplete
Why It's Essential
Laravel Extra Intellisense provides intelligent autocomplete for Laravel facades, models, views, routes, configs, translations, and more. It understands your Laravel project structure and offers context-aware suggestions.
Key Features
- Route Autocomplete: Autocomplete for
route()helper with all defined routes - View Autocomplete: Suggests available Blade views
- Config Autocomplete: Complete config keys with
config() - Translation Keys: Autocomplete for
trans()and__()helpers - Validation Rules: Suggests Laravel validation rules
- Eloquent Methods: Smart suggestions for model methods
Setup & Configuration
// settings.json
{
"LaravelExtraIntellisense.phpCommand": "php -r \"{code}\"",
"LaravelExtraIntellisense.basePath": "./",
"LaravelExtraIntellisense.skipRunningComposerInstallOnProjectOpen": false
}
Real-World Impact
Before: Manually checking routes file for route names, constant typos.
After: Instant autocomplete with all available routes—zero typos.
Productivity Gain: 70% faster when working with routes, views, and configs.
Pro Tips
// Autocomplete works automatically
route('|') // Shows all routes
view('|') // Shows all views
config('|') // Shows all config keys
trans('|') // Shows all translation keys
__('validation.|') // Shows validation translations
// Also works in route parameters
route('user.show', ['user' => $user->|]) // Suggests $user properties
2. Laravel Blade Snippets – Lightning-Fast Templating
Why It's Essential
Laravel Blade Snippets provides comprehensive snippets for Blade templates, Laravel syntax, and common patterns—dramatically speeding up view development.
Key Snippets
{{-- Type these shortcuts and press Tab --}}
b:if → @if($condition)
b:foreach → @foreach($items as $item)
b:extends → @extends('layouts.app')
b:section → @section('content')
b:include → @include('partials.header')
b:yield → @yield('content')
b:auth → @auth
b:guest → @guest
b:can → @can('edit', $post)
b:empty → @empty($items)
Extended Snippets
{{-- Component shortcuts --}}
b:component → <x-component-name />
b:slot → <x-slot:name>
{{-- Form shortcuts --}}
b:csrf → @csrf
b:method → @method('PUT')
b:error → @error('field')
{{-- Loop shortcuts --}}
b:forelse → @forelse($items as $item) @empty @endforelse
Custom Snippets
Create your own snippets in User Snippets:
{
"Laravel Card Component": {
"prefix": "b:card",
"body": [
"<div class=\"card\">",
" <div class=\"card-header\">",
" $1",
" </div>",
" <div class=\"card-body\">",
" $2",
" </div>",
"</div>"
],
"description": "Create a card component"
}
}
Productivity Gain: Write Blade templates 3x faster with muscle memory shortcuts.
3. PHP Intelephense – Intelligent PHP Support
Why It's Essential
Intelephense is the most powerful PHP language server for VS Code, providing deep code intelligence, refactoring, and error detection specifically optimized for Laravel.
Key Features
- Smart Autocomplete: Context-aware suggestions for PHP and Laravel
- Go to Definition: Jump to class, method, or property definitions instantly
- Find All References: See where any symbol is used
- Code Formatting: PSR-12 compliant formatting
- Error Detection: Real-time PHP syntax and semantic errors
- Symbol Renaming: Safely rename classes, methods, properties
- Code Actions: Quick fixes and refactoring suggestions
Configuration
{
"intelephense.files.maxSize": 5000000,
"intelephense.telemetry.enabled": false,
"intelephense.format.enable": true,
"intelephense.completion.triggerParameterHints": true,
"intelephense.completion.insertUseDeclaration": true,
"intelephense.completion.fullyQualifyGlobalConstantsAndFunctions": false,
"php.suggest.basic": false
}
Premium Features (Worth It!)
The premium license ($15) unlocks:
- Code Folding: Collapse/expand code blocks intelligently
- Smart Selection: Expand selection based on syntax
- Implementation Finder: Find all implementations of interfaces
- Rename Refactoring: Safe, project-wide symbol renaming
Usage Examples
// Hover over any class/method to see documentation
User::find(1); // Hover to see method signature
// Ctrl+Click (Cmd+Click) to jump to definition
$this->userRepository->create(); // Jump to repository
// F2 to rename safely across entire project
class UserService {} // Rename updates all references
// Ctrl+Space for intelligent autocomplete
$user->ord| // Suggests: orders(), orderBy(), etc.
Productivity Gain: 80% reduction in time spent navigating code and fixing syntax errors.
4. Laravel Goto View – Instant View Navigation
Why It's Essential
Laravel Goto View allows you to quickly navigate from controllers to views and vice versa. Ctrl+Click on view names to open them instantly.
Key Features
- View Navigation: Ctrl+Click on
view('name')to open the view file - Reverse Navigation: Jump from view back to controller
- Blade Component Navigation: Navigate to component classes
- View Path Autocomplete: Suggests view paths as you type
Usage
// Ctrl+Click (Cmd+Click) on view name to open
return view('users.index'); // Opens resources/views/users/index.blade.php
return view('components.alert'); // Opens view component
// Works with includes
@include('partials.header') // Ctrl+Click to open
// Works with components
<x-alert type="success" /> // Ctrl+Click to open component class
Configuration
{
"LaravelGotoView.viewsPath": "resources/views",
"LaravelGotoView.componentsPath": "app/View/Components"
}
Productivity Gain: Navigate between controllers and views in under 1 second.
5. Better PHPUnit – Test-Driven Development
Why It's Essential
Better PHPUnit brings powerful testing capabilities directly into VS Code—run tests, see results, and debug failures without leaving the editor.
Key Features
- Run Single Test: Execute one test method
- Run Test Class: Run all tests in a file
- Run Test Suite: Execute entire test suite
- Debug Tests: Set breakpoints and debug tests
- Test Explorer: Visual test runner interface
- Code Coverage: See coverage inline
Keyboard Shortcuts
Cmd+K Cmd+R → Run current test
Cmd+K Cmd+F → Run test file
Cmd+K Cmd+P → Run previous test
Cmd+K Cmd+D → Debug test
Configuration
{
"better-phpunit.commandSuffix": "--colors=always",
"better-phpunit.phpunitBinary": "vendor/bin/phpunit",
"better-phpunit.suiteSuffix": "--testsuite Feature",
"better-phpunit.dockerEnable": false
}
Docker/Sail Support
{
"better-phpunit.dockerEnable": true,
"better-phpunit.dockerCommand": "sail",
"better-phpunit.commandSuffix": "test"
}
Productivity Gain: Run and debug tests 5x faster without switching to terminal.
6. PHP Namespace Resolver – Automatic Imports
Why It's Essential
PHP Namespace Resolver automatically imports classes and sorts imports—no more manually writing use statements.
Key Features
- Auto Import Classes: Automatically add
usestatements - Import on Paste: Add imports when pasting code
- Sort Imports: Organize use statements alphabetically
- Remove Unused Imports: Clean up unused use statements
- Multi-cursor Support: Import multiple classes simultaneously
Usage
// Before: Type class name
$user = new User(); // User is not imported
// Press Alt+I (Option+I on Mac)
use App\Models\User; // Automatically added
// Or use autocomplete and it imports automatically
PaymentService::process() // Auto-imports when selected
// Sort imports: Alt+S (Option+S)
use App\Services\PaymentService;
use App\Models\User;
use Illuminate\Support\Facades\DB;
// Becomes alphabetically sorted
Configuration
{
"namespaceResolver.sortOnSave": true,
"namespaceResolver.showMessageOnStatusBar": true,
"namespaceResolver.autoSort": true,
"namespaceResolver.sortAlphabetically": true,
"namespaceResolver.sortNatural": false
}
Productivity Gain: Never manually write use statements again—automatic and instant.
7. Tailwind CSS IntelliSense – Smart Styling
Why It's Essential
Since most modern Laravel projects use Tailwind CSS, this extension provides intelligent autocomplete, linting, and hover previews for Tailwind classes.
Key Features
- Autocomplete: Intelligent suggestions for Tailwind classes
- Hover Preview: See CSS output when hovering over classes
- Linting: Error detection for invalid/conflicting classes
- Variant Support: Autocomplete for responsive and state variants
- Custom Config: Respects your tailwind.config.js
Configuration
{
"tailwindCSS.includeLanguages": {
"blade": "html",
"php": "html"
},
"tailwindCSS.emmetCompletions": true,
"tailwindCSS.experimental.classRegex": [
"class: '([^']*)'",
"class: \"([^\"]*)\"",
"classList: {([^}]*)}"
]
}
Usage in Blade
{{-- Autocomplete works in class attributes --}}
<div class="flex items-center justify-between p-4 bg-|">
^
Suggestions appear
{{-- Works with dynamic classes --}}
<div class="{{ $active ? 'text-blue-500' : 'text-gray-500' }}">
{{-- Hover over classes to see CSS --}}
<div class="mt-4"> {{-- Hover shows: margin-top: 1rem; --}}
Productivity Gain: Write Tailwind classes 4x faster with zero documentation lookups.
8. Error Lens – Inline Error Display
Why It's Essential
Error Lens makes diagnostics stand out by highlighting errors and warnings inline, eliminating the need to hover or check the problems panel.
Key Features
- Inline Errors: Display errors directly in code
- Inline Warnings: Show warnings where they occur
- Customizable Appearance: Configure colors and styles
- Instant Feedback: See issues as you type
- Multi-language Support: Works with PHP, JavaScript, CSS
Configuration
{
"errorLens.enabledDiagnosticLevels": ["error", "warning", "info"],
"errorLens.errorBackground": "rgba(255,0,0,0.1)",
"errorLens.errorForeground": "#ff0000",
"errorLens.warningBackground": "rgba(255,200,0,0.1)",
"errorLens.warningForeground": "#ff9900",
"errorLens.delay": 500
}
Visual Example
// Error appears inline immediately
$user = User:find(1); // ❌ Undefined method find() - Did you mean find()?
// Warning appears inline
$unused = 'value'; // ⚠️ Variable $unused is assigned but never used
// Type error shown inline
function process(int $id) {}
process('string'); // ❌ Argument must be of type int, string given
Productivity Gain: Catch and fix errors 70% faster without hovering or checking panels.
9. GitLens – Supercharged Git Integration
Why It's Essential
GitLens enhances VS Code's Git capabilities, providing powerful visualizations, blame annotations, and history exploration—essential for team collaboration.
Key Features
- Git Blame Inline: See who changed each line and when
- Commit Details: Hover over any line for full commit info
- File History: Visual timeline of file changes
- Compare Branches: Side-by-side branch comparison
- Search Commits: Find commits by message, author, or file
- Code Lens: Show recent changes and authors
Configuration
{
"gitlens.currentLine.enabled": true,
"gitlens.hovers.currentLine.over": "line",
"gitlens.codeLens.enabled": true,
"gitlens.codeLens.recentChange.enabled": true,
"gitlens.codeLens.authors.enabled": true
}
Usage Examples
// Inline blame shows on current line
public function process() // John Doe, 2 days ago - Fix payment processing
// Hover over any line to see commit details
$user = User::find($id);
// Commit: a3b2c4d - "Add user lookup optimization" by Jane Smith
// View file history
// Click GitLens icon in sidebar → File History → See all changes
// Compare with previous revision
// Right-click → GitLens → Compare File with Previous Revision
Productivity Gain: Understand code history and collaborate 60% more effectively.
10. DotENV – Environment File Support
Why It's Essential
DotENV provides syntax highlighting, autocomplete, and validation for .env files—crucial for Laravel configuration.
Key Features
- Syntax Highlighting: Color-coded .env variables
- Autocomplete: Suggests existing variables
- Validation: Detect syntax errors
- Go to Definition: Jump from
env()calls to .env file - Format on Save: Organize .env files
Configuration
{
"dotenv.enableAutocloaking": false,
"files.associations": {
".env*": "dotenv"
}
}
Usage
# Autocomplete shows existing variables
APP_URL=${APP_|} # Suggests APP_NAME, APP_ENV, etc.
# Syntax highlighting
APP_NAME="My App" # String in green
APP_DEBUG=true # Boolean in blue
DB_PORT=3306 # Number in orange
# Jump to definition from PHP code
config('app.name') // Ctrl+Click jumps to APP_NAME in .env
Productivity Gain: Manage environment variables 50% faster with fewer typos.
Bonus Extensions Worth Considering
11. Thunder Client – API Testing
REST API client built into VS Code—test Laravel APIs without Postman.
{
"thunder-client.saveToWorkspace": true,
"thunder-client.requestLayout": "Left/Right"
}
12. Todo Tree – Task Management
Highlight and organize TODO comments across your Laravel project.
{
"todo-tree.highlights.defaultHighlight": {
"icon": "alert",
"type": "text",
"foreground": "#000000",
"background": "#ffff00"
},
"todo-tree.general.tags": [
"TODO",
"FIXME",
"BUG",
"HACK"
]
}
13. Auto Rename Tag
Automatically rename paired HTML/Blade tags.
14. Path Intellisense
Autocomplete for file paths in imports and require statements.
15. Bracket Pair Colorizer
Color-code matching brackets (built into VS Code 1.60+).
Complete VS Code Settings for Laravel
{
// Editor settings
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.suggestSelection": "first",
"editor.linkedEditing": true,
"editor.bracketPairColorization.enabled": true,
"editor.guides.bracketPairs": true,
// PHP settings
"php.suggest.basic": false,
"php.validate.enable": true,
"php.validate.executablePath": "/usr/bin/php",
// Intelephense settings
"intelephense.files.maxSize": 5000000,
"intelephense.completion.insertUseDeclaration": true,
"intelephense.format.enable": true,
// File associations
"files.associations": {
"*.blade.php": "blade",
".env*": "dotenv"
},
// Emmet
"emmet.includeLanguages": {
"blade": "html",
"php": "html"
},
// Tailwind
"tailwindCSS.includeLanguages": {
"blade": "html",
"php": "html"
},
// Auto save
"files.autoSave": "onFocusChange",
// Terminal
"terminal.integrated.defaultProfile.linux": "bash",
"terminal.integrated.fontSize": 13,
// Laravel specific
"LaravelExtraIntellisense.phpCommand": "php -r \"{code}\"",
"namespaceResolver.sortOnSave": true,
// Exclude from search
"search.exclude": {
"**/node_modules": true,
"**/vendor": true,
"**/.git": true,
"**/storage": true,
"**/bootstrap/cache": true
}
}
Recommended Keyboard Shortcuts
// keybindings.json
[
{
"key": "cmd+shift+i",
"command": "namespaceResolver.import"
},
{
"key": "cmd+shift+s",
"command": "namespaceResolver.sort"
},
{
"key": "cmd+k cmd+r",
"command": "better-phpunit.run"
},
{
"key": "cmd+k cmd+d",
"command": "better-phpunit.run-previous"
},
{
"key": "cmd+shift+f",
"command": "workbench.action.formatDocument"
}
]
Productivity Impact Summary
| Extension | Time Saved/Week | Key Benefit |
|---|---|---|
| Laravel Extra Intellisense | 4-6 hours | Smart autocomplete |
| Blade Snippets | 3-5 hours | Fast templating |
| Intelephense | 5-8 hours | Code navigation |
| Laravel Goto View | 2-3 hours | Quick navigation |
| Better PHPUnit | 3-4 hours | Fast testing |
| Namespace Resolver | 2-3 hours | Auto imports |
| Tailwind IntelliSense | 3-5 hours | Fast styling |
| Error Lens | 2-3 hours | Quick fixes |
| GitLens | 2-4 hours | Better collaboration |
| DotENV | 1-2 hours | Config management |
Total Weekly Time Saved: 27-43 hours per developer
Installation Quick Start
# Install all essential extensions via command line
code --install-extension amiralizadeh9480.laravel-extra-intellisense
code --install-extension onecentlin.laravel-blade
code --install-extension bmewburn.vscode-intelephense-client
code --install-extension codingyu.laravel-goto-view
code --install-extension calebporzio.better-phpunit
code --install-extension mehedidracula.php-namespace-resolver
code --install-extension bradlc.vscode-tailwindcss
code --install-extension usernamehw.errorlens
code --install-extension eamodio.gitlens
code --install-extension mikestead.dotenv
Conclusion
The right VS Code extensions transform Laravel development from good to exceptional. These 10 extensions represent the essential toolkit every Laravel developer should master in 2025. They've collectively saved our team thousands of hours through intelligent autocomplete, instant navigation, automated imports, and seamless testing workflows.
The investment in setting up these extensions pays immediate dividends. Start with Laravel Extra Intellisense and Intelephense for core functionality, add Blade Snippets for templating speed, and gradually adopt the others based on your workflow needs.
Key takeaways:
- Laravel Extra Intellisense for smart autocomplete
- Intelephense for powerful PHP intelligence
- Blade Snippets for lightning-fast templating
- Laravel Goto View for instant navigation
- Better PHPUnit for seamless testing
- Namespace Resolver for automatic imports
- Tailwind IntelliSense for fast styling
- Error Lens for immediate feedback
- GitLens for team collaboration
- DotENV for config management
Ready to supercharge your Laravel development workflow? NeedLaravelSite uses these cutting-edge tools to deliver high-quality Laravel applications. Contact us for expert Laravel development services.
Related Resources: