Laravel Blade All-in-oneAll-in-one extension for Laravel Blade and common Laravel PHP workflows. Publisher: Codename Ryuu A single pack for Laravel Blade — formatting, highlighting, spacer, snippets, navigation, and IntelliSense — without installing several separate extensions. Features
1. FormatterFormats
Format on SaveTo format Blade files automatically when saving, add this to your VS Code / Cursor
You can open settings with Preferences: Open User Settings (JSON) or put the same block in 2. Syntax highlightingRegisters the
3. Blade spacerWhile typing, inserts spaces inside Blade echo / comment tags:
Toggle with 4. SnippetsBlade (
|
| Prefix | Inserts |
|---|---|
Route::get / Route::post / Route::resource |
Route definitions |
l:model |
Eloquent model class stub |
l:fillable / l:casts / l:hasMany / … |
Common model pieces |
config / route / view |
Helpers |
Auth::user / DB::transaction |
Common calls |
PHP — Eloquent model (Model::)
| Prefix | Inserts |
|---|---|
Model::f |
$fillable |
Model::c |
casts() |
Model::om |
hasMany |
Model::bt |
belongsTo |
Model::mm |
belongsToMany |
Model::t / Model::pk / Model::ts |
table / primary key / timestamps |
Model::ac / Model::mu |
Attribute accessor / mutator |
Type Model:: inside a PHP model file to see the full list.
5. Path & middleware navigation
Ctrl/Cmd+Click (or Go to Definition) in Blade / PHP:
| From | Opens |
|---|---|
@include / @extends / @component / @each / … |
View .blade.php |
@vite('resources/js/app.js') |
Vite entry file from project root |
<x-forms.input> |
Component view or class |
route('name') |
Route file that defines the name |
->middleware(['guest']) |
Middleware class |
'middleware' => ['guest'] |
Middleware class (route group array) |
View disks are configurable via blade.views (default resources/views).
6. Laravel IntelliSense
Completions for:
- Blade directives (with snippet bodies after
@) - Route names inside
route('…') - Views inside
view('…')/@include('…')/ … - Config keys inside
config('…') - Translation keys inside
__('…')/@lang('…') - Model names under
App\Models\
Command: Blade: Refresh Laravel IntelliSense Index (laravel-blade.refreshIntellisense)
Toggle: blade.intellisense.enable
Extension settings
Pack (blade.*)
| Setting | Description | Default |
|---|---|---|
blade.spacer.enable |
Auto-space Blade echo tags while typing | true |
blade.views |
View disks for navigation (paths relative to project root) | { "default": "resources/views" } |
blade.intellisense.enable |
Enable Laravel IntelliSense completions | true |
Formatter (bladeFormatter.*)
| Setting | Description | Default |
|---|---|---|
bladeFormatter.format.enabled |
Enable formatting | true |
bladeFormatter.format.indentSize |
Indent size | 4 |
bladeFormatter.format.wrapLineLength |
Line wrap length | 120 |
bladeFormatter.format.wrapAttributes |
Attribute wrap mode | auto |
bladeFormatter.format.wrapAttributesMinAttrs |
Min attrs for force wrap modes | 2 |
bladeFormatter.format.useTabs |
Use tabs | false |
bladeFormatter.format.sortTailwindcssClasses |
Sort Tailwind classes | false |
bladeFormatter.format.sortHtmlAttributes |
Sort HTML attributes | none |
bladeFormatter.format.customHtmlAttributesOrder |
Custom order when sort is custom |
"" |
bladeFormatter.format.noMultipleEmptyLines |
Collapse blank lines | false |
bladeFormatter.format.noPhpSyntaxCheck |
Skip PHP syntax check | false |
bladeFormatter.format.indentInnerHtml |
Indent <head> / <body> |
false |
bladeFormatter.format.noSingleQuote |
Prefer double quotes in PHP expressions | false |
bladeFormatter.format.noTrailingCommaPhp |
No trailing commas in PHP expressions | false |
bladeFormatter.format.componentPrefix |
Custom component prefixes | x-,livewire |
bladeFormatter.format.phpVersion |
PHP syntax compatibility | 8.4 |
bladeFormatter.misc.dontShowNewVersionMessage |
Hide update toast | false |
Project config
.bladeformatterrc.json / .bladeformatterrc
{
"indentSize": 4,
"wrapAttributes": "auto",
"wrapAttributesMinAttrs": 2,
"wrapLineLength": 120,
"endWithNewLine": true,
"noMultipleEmptyLines": false,
"useTabs": false,
"sortTailwindcssClasses": true,
"sortHtmlAttributes": "none",
"noPhpSyntaxCheck": false,
"noSingleQuote": false,
"noTrailingCommaPhp": false,
"componentPrefix": ["x-", "livewire:"],
"phpVersion": "8.4"
}
JSON Schema is bundled for editor validation.
.bladeignore
resources/views/email/**
Commands
| Command | ID |
|---|---|
| Blade: Format Document | laravel-blade.format |
| Blade: Refresh Laravel IntelliSense Index | laravel-blade.refreshIntellisense |
License
MIT © Codename Ryuu