Skip to content

ide.json: Blade


Overview

Example ide.json:

json
{
    "$schema": "https://laravel-ide.com/schema/laravel-ide-v2.json",
    "blade": {
        "components": {
            "viewPaths": [
                {
                    "path": "directory/with/blade/component/views",
                    "namespace": "namespace"
                },
                {
                    "path": "/resources/anotherViews/components",
                    "namespace": "",
                    "prefix": "prefix-",
                    "viewNamespace": "jetstream"
                }
            ]
        }
    }
}

All blade files in the directory/with/blade/component/views folder will be used as blade components with namespace: <x-namespace::foo>


Jetstream package converts all views from its resources/views/components folder to blade components by changing jetstream namespace to empty and adding jet- prefix. Laravel Idea has support for Jetstream, but all this "support" can be implemented by this simple instruction in the ide.json file.