Skip to content

LaraSelectorClick in the browser. Land in your code.

Maps any element on your local Laravel page to its Blade file, page controller or form action, and opens it in your editor.

LaraSelector

Animated illustration: hover an element in the browser, its Blade file opens in the editor

Illustration of the flow

How it works ​

1

Mark

While Blade compiles, static HTML tags get a tiny source token pointing to the file and line. Nothing is stored in your views.

2

Select

In Chrome, click Start selecting, hover and click an element. The extension reads its token.

3

Open

The package resolves the token, the page controller and the form action, and your editor opens at the exact line.

Set up in a minute ​

sh
composer require --dev mhmdelbadry74/laraselector-laravel
php artisan vendor:publish --tag=laraselector-config
dotenv
LARASELECTOR_ENABLED=true
LARASELECTOR_EDITOR=vscode   # vscode | cursor | phpstorm
sh
php artisan view:clear

Then load the Chrome extension and start selecting. The full guide covers every step.

What it can open ​

You clickLaraSelector opens
Any elementThe Blade file and line, through layouts, includes, loops, conditionals, components and slots
Anywhere on the pageThe controller method that renders the page, including invokable controllers, inherited methods and closures
A form or submit buttonThe controller behind its action, with GET/POST, _method spoofing and formaction

Works with ​

Laravel 10Laravel 11Laravel 12PHP 8.1+VS CodeCursorPhpStormChromeDocker

Built to be safe ​

Development only

Allowed only in local and dev. Production is always denied.

Nothing is executed

Routes are matched against a synthetic request and never dispatched.

Locked down

Same-origin checks, a session token, and real-path validation inside an allowlist.

Local-only

No data leaves your machine. See the privacy policy.

FAQ ​

Does it slow down my app? It only runs in development, and activation is checked at render time.

Will it leak into production? No. Production is always denied, and cached views stop emitting attributes once it is disabled.

Does it work in Docker? Yes, set path_mapping to translate container paths to your local paths.

Livewire? Supported: open the component class, its render(), the action under the cursor, and inspect its public properties.

Ready to try it?

Install the package and jump from any element to your code.

Get started

MIT License