Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Laravel Blade NavigatorNew to Visual Studio Code? Get it now.
Laravel Blade Navigator

Laravel Blade Navigator

Takashi Hishiki

| (0) | Free
Navigate between Laravel controller actions and Blade templates via the right-click context menu.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Laravel Blade Navigator

Navigate effortlessly between Laravel controller actions and Blade templates using the right-click context menu in Visual Studio Code.

All commands are grouped under a Laravel submenu in the editor context menu, keeping your context menu clean and organized.


Features

  • Go to Blade Template — Jump from a controller action to the corresponding Blade template.
  • Create Blade Template — Create a Blade template file for the current action if it does not exist yet.
  • Go to Controller Action — Jump from a Blade template back to the controller action that renders it.
  • Automatically resolves view() calls on or near the cursor line.
  • Falls back to inferring the template path from the controller class name and method name.
  • Offers to create a missing controller or action method when navigating from a Blade file.

Requirements

  • A Laravel project open as a workspace folder.
  • Blade templates located under resources/views/.
  • Controller files located under app/Http/Controllers/.

Usage

From a Controller → Blade Template

  1. Open any PHP controller file.
  2. Right-click in the editor.
  3. Select Laravel → Go to Blade Template to open the corresponding .blade.php file.
    • If the file does not exist, you are prompted to create it.
  4. Or select Laravel → Create Blade Template to create the file directly.
    • If the file already exists, it is opened immediately.

From a Blade Template → Controller Action

  1. Open any .blade.php file.
  2. Right-click in the editor.
  3. Select Laravel → Go to Controller Action.
  4. The corresponding controller file opens and the cursor jumps to the matching action method.
    • If the controller file does not exist, you are prompted to create it.
    • If the controller exists but the action method is missing, you are prompted to append it.

Template Name Resolution

The extension resolves Blade templates in the following order:

  1. Explicit view() call on or near the cursor — detects view('folder.action') within ±5 lines.
  2. Route::view() call — detects the second argument as the view name.
  3. Inferred from class and method — strips Controller from the class name and uses the method name, producing resources/views/controllerName/actionName.blade.php.

Laravel dot-notation is fully supported: view('admin.users.index') resolves to resources/views/admin/users/index.blade.php.


Reverse Mapping (Blade → Controller)

Given a Blade path such as:

resources/views/product/index.blade.php

The extension infers:

  • Controller class: ProductController
  • Action method: index

It then searches app/Http/Controllers/ recursively for ProductController.php and jumps to the index method.


Created File Stubs

Blade template (*.blade.php):

{{-- action --}}

@extends('layouts.app')

@section('content')

@endsection

Controller (*Controller.php):

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class ProductController extends Controller
{
    public function index(Request $request)
    {
        return view('product.index');
    }
}

Extension Settings

This extension does not add any configuration settings at this time.


Known Limitations

  • Non-standard project structures may require manual navigation.
  • Deeply nested view folders use only the deepest folder segment to infer the controller name.
  • Only .blade.php templates are detected.

Release Notes

0.0.1

Initial release.

  • Right-click Laravel submenu in the editor context menu.
  • Navigate from controller to Blade template (Go to / Create).
  • Navigate from Blade template to controller action.
  • Auto-creation of missing Blade files, controller files, and action methods.

Repository

https://github.com/TakashiHishiki/laravel-blade-navigator


License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft