12 The Best Extension Visual Studio Code for Laravel

12 The Best Extension Visual Studio Code for Laravel

1. Laravel Blade Snippets

Provides syntax highlighting & autocompletions for Laravel Blade templates.
🔗 Install Link

{{-- Blade Syntax Highlighting --}} @if(auth()->user()) <p>Welcome, {{ auth()->user()->name }}</p> @endif

2. Laravel Snippets

Offers useful Laravel snippets for controllers, models, routes, migrations, etc.
🔗 Install Link

// Example: Generates a Laravel model php artisan make:model Post

3. Laravel Artisan

Run Artisan commands directly inside VS Code.
🔗 Install Link

# Example: Running an Artisan command in VS Code php artisan migrate

4. Laravel Extra Intellisense

Provides additional Laravel helper functions and autocompletions.
🔗 Install Link

route('home'); // Autocomplete route names view('welcome'); // Autocomplete view names

5. PHP Intelephense

A powerful PHP extension for advanced IntelliSense, linting, and formatting.
🔗 Install Link

// Example: Autocompletion for Laravel methods User::where('email', 'test@example.com')->first();

6. DotENV

Syntax highlighting for .env files to manage Laravel environment variables easily.
🔗 Install Link

APP_NAME=LaravelApp APP_ENV=local DB_CONNECTION=mysql

7. Laravel goto Controller

Quickly navigate between routes, controllers, and views.
🔗 Install Link

Route::get('/dashboard', [DashboardController::class, 'index']);

Click on DashboardController to open it instantly!

8. Laravel Model Snippets

Generate Eloquent model snippets quickly.
🔗 Install Link

// Example: Quick model definition class Post extends Model { protected $fillable = ['title', 'content']; }

9. Laravel Blade Formatter

Formats Laravel Blade templates with clean indentation and structure.
🔗 Install Link

{{-- Before Formatting --}} @if(auth()->user()) <p>Hello, {{ auth()->user()->name }}</p> @endif {{-- After Formatting --}} @if(auth()->user()) <p>Hello, {{ auth()->user()->name }}</p> @endif

10. Auto Close Tag

Automatically closes HTML and Blade tags in Laravel projects.
🔗 Install Link

{{-- Example: Typing <div> will automatically add </div> --}} <div> <p>Hello, Laravel!</p> </div>

11. Laravel Language Snippets

Provides localization (lang) file snippets for Laravel.
🔗 Install Link

// Example: Using translation functions __('messages.welcome'); // Automatically suggests lang file keys

12. GitLens

Advanced Git integration with inline blame, history, and file comparison.
🔗 Install Link

# Example: See who last modified a line in your Laravel project git blame routes/web.php

Summary: Best Laravel VS Code Extensions

ExtensionFunctionality
Laravel Blade SnippetsBlade syntax highlighting & snippets
Laravel SnippetsAutocomplete for Laravel code
Laravel ArtisanRun Artisan commands from VS Code
Laravel Extra IntellisenseProvides additional Laravel helpers
PHP IntelephenseAdvanced PHP IntelliSense & linting
DotENVSyntax highlighting for .env files
Laravel goto ControllerQuick navigation between routes, controllers, views
Laravel Model SnippetsGenerates Eloquent model snippets
Laravel Blade FormatterFormats Blade templates automatically
Auto Close TagAuto-closes Blade & HTML tags
Laravel Language SnippetsProvides snippets for Laravel localization
GitLensGit integration with file history & blame

Conclusion

These 12 VS Code extensions will help streamline your Laravel development workflow, making coding faster and more efficient.

Would you like recommendations for Laravel debugging or database management tools as well? 😊

Soeng Souy

Soeng Souy

Website that learns and reads, PHP, Framework Laravel, How to and download Admin template sample source code free.

Post a Comment

CAN FEEDBACK
close