Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Laravel IntelephenseNew to Visual Studio Code? Get it now.

Laravel Intelephense

Porifa

|
7,200 installs
| (1) | Free
Laravel Intelephense for Visual Studio Code is all in one (laravel blade snippets, laravel goto view, laravel goto components, laravel goto controller, laravel blade spacer)
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Laravel Intelephense

Lararvel Intelephense is code intelligence for productive Laravel development.

Features

  • Show Suggestions based on the Laravel version
  • Auto-Completion
  • Files Creation
  • Go to View
  • Env File Syntax Highlighting
  • Curly Braces Spacer

Requirements

You Must have a workspace open having Laravel Installed.

Show Suggestions based on the Laravel version

  • Version History of Blade Directives
  • Version History of Validation Rules

Auto-Completion

  • Suggests Blade Directives
  • Suggests Route names and route parameters
  • Suggests Views and variables
  • Suggests Configs keys
  • Suggests Translations and translation parameters
  • Suggests Laravel mix function
  • Suggests Validation rules
  • Suggests View sections and stacks
  • Suggests Env Variables
  • Suggests Route Middlewares
  • Suggests Asset in the public directory

Files Creation

  • Create View (Blade) Files by selecting a valid string
  • Auto Suggest creating a view file if already doesn't exist

Go To View

  • Go to view from blade and PHP files

Env File Syntax Highlighting

  • Syntax Highlighting for environment files like (.env, .env.example)

Curly Braces/brackets Spacer

  • Add Spaces between curly braces

Extension Settings

These are the setting you can use.

Customize the Maximum number of scanning rows

"LaravelIntelephense.maxLinesCount": 1000

default is 1000.

Add Custom Validation Rules as an object

"LaravelIntelephense.customValidationRules": {}

for validation rule auto-completion.

Add Models path as an array

"LaravelIntelephense.modelsPaths": ["app", "app/Models" ]

these 2 paths are included by default

Customize view file extensions

"LaravelIntelephense.viewExtensions": [".blade.php", ".vue" ]

these 2 extensions are included by default

Customize view folders paths

"LaravelIntelephense.viewFolders": {
                            "default": "/resources/views",
                            "js": "/resources/js/Pages",
                            "livewire": "/resources/views/livewire",
                            "vendor": "/resources/views/vendor"
                        }

these 3 extensions are included by default,

Add View Directory Separator

"LaravelIntelephense.viewDirectorySeparator": "."

default is ".", you can use "/".

Enable/Disable creating a view file from any valid string

"LaravelIntelephense.createViewEveryWhere": true

to enable or disable creating a view file from EveryWhere.

Enable/Disable Go To View

"LaravelIntelephense.disableGoToView": false

If you want to disable the go-to view feature, set this to true.

Enable/Disable Go To Config

"LaravelIntelephense.disableGoToConfig": false

If you want to disable the go-to config feature, set this to true.

Enable/Disable Assets Auto-Completion

"LaravelIntelephense.disableAssetCompletion": false

If you want to disable assets autocomplete set this to true.

Enable/Disable Auth Auto-Completion

"LaravelIntelephense.disableAuthCompletion": false

If you want to disable auth autocomplete set this to true.

Enable/Disable Blade Auto-Completion

"LaravelIntelephense.disableBladeCompletion": false

If you want to disable blade directives autocomplete set this to true.

Enable/Disable Controller Auto-Completion

"LaravelIntelephense.disableControllerCompletion": false

If you want to disable Controller autocomplete set this to true.

Enable/Disable Config Auto-Completion

"LaravelIntelephense.disableConfigCompletion": false

If you want to disable config autocomplete set this to true.

Enable/Disable Curly Braces Spacer

"LaravelIntelephense.disableCurlyBracesSpacer": false

to enable or disable Curly Braces Spacer. By default, it is enabled

Enable/Disable Eloquent Auto-Completion

"LaravelIntelephense.disableEloquentCompletion": false

If you want to disable Eloquent autocomplete set this to true.

Enable/Disable Env Auto-Completion

"LaravelIntelephense.disableEnvCompletion": false

If you want to disable Env autocomplete set this to true.

Enable/Disable Middleware Auto-Completion

"LaravelIntelephense.disableMiddlewareCompletion": false

If you want to disable Middleware autocomplete set this to true.

Enable/Disable Mix Auto-Completion

"LaravelIntelephense.disableMixCompletion": false

If you want to disable Mix autocomplete set this to true.

Enable/Disable Route Auto-Completion

"LaravelIntelephense.disableRouteCompletion": false

If you want to disable Route autocomplete set this to true.

Enable/Disable Translation Auto-Completion

"LaravelIntelephense.disableTranslationCompletion": false

If you want to disable Translation autocomplete set this to true.

Enable/Disable Validation Auto-Completion

"LaravelIntelephense.disableValidationCompletion": false

If you want to disable Validation autocomplete set this to true.

Enable/Disable View Auto-Completion

"LaravelIntelephense.disableViewCompletion": false

If you want to disable View autocomplete set this to true.

Advance Configurations

Configure Regex for Matching view files

"LaravelIntelephense.viewRegex": "(?<=view\\(['\"]|.view:.?['\"]|View::make\\(['\"]|nest\\(['\"](https://github.com/porifa/vscode-laraphense/blob/HEAD/.*)['\"],.?['\"]|@include\\(['\"]|@extends\\(['\"]|@component\\(['\"]|@livewire\\(['\"]|Inertia::render\\(['\"]|\\(component:.['\"]|\\<)(\\<x-|\\<livewire:|[^'\" \\>]+)"

this regex is used to match the view files for quick jumping.

Configure Regex for Creating view files

"LaravelIntelephense.viewCreateRegex": "(?<=View::make\\(['\"]|view\\(['\"]|.view:.['\"]|Inertia::render\\(['\"]|\\(component:.['\"])([^'\"]+)"

this regex is used to match the view files for auto-suggestion.

Configure the PHP command like this

"LaravelIntelephense.phpCommand": "php -r \"{code}\""

this command is used to run PHP for indexing Laravel files.

Configure the Base path like this

"LaravelIntelephense.basePath": "/core"

this Base path is used to read files.

Configure the Code Base path like this

"LaravelIntelephense.basePathForCode": "/core/laravel"

This base path is used for require_once inside the PHP code.

Credits

  • PHP parser
  • mkdirp

Recommended extensions

  • PHP Intelephense

Enjoy!

  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft