Skip to content

ide.json: Views

Overview

The view section lets you register additional view paths so Laravel Idea can resolve and complete view names from those directories.

This is useful for packages that ship their own Blade views under a namespace or for applications that have non-standard view directories.

view.paths

An array of path entries. Each entry has a required path and an optional namespace.

FieldRequiredDescription
pathYesPath to the views directory. Relative to the ide.json file, or absolute from project root when starting with /.
namespaceNoView namespace prefix (e.g. "mypackage" → views are referenced as mypackage::view-name).

Example: package views without a namespace

json
{
    "$schema": "https://laravel-ide.com/schema/laravel-ide-v2.json",
    "view": {
        "paths": [
            {
                "path": "/resources/views/vendor/my-package"
            }
        ]
    }
}

Example: namespaced package views

json
{
    "$schema": "https://laravel-ide.com/schema/laravel-ide-v2.json",
    "view": {
        "paths": [
            {
                "path": "resources/views",
                "namespace": "my-package"
            }
        ]
    }
}

With the namespace set, Laravel Idea will complete my-package:: view references in view(), @include, @extends, and similar places.

Path resolution

Path values follow the same rules as other path fields in ide.json:

  • /resources/views — absolute from the project root (the PhpStorm project root).
  • resources/views — relative to the folder containing ide.json.
  • ../../resources/views — relative, two levels up from the folder containing ide.json.