Ad

Referencing A Blade Layout From A View Inside A Folder

- 1 answer

I have organised my app to have switchable themes. I have several themes. Each theme has its own layout.

The image shows how i have organised my themes inside the views folder:

enter image description here

How can i reference my layout here @extends('layouts.app') ?

Does blade use dot notation for nesting or does a slash / do?.

Ad

Answer

Blade uses dot notation to specify nesting. Unless you've configured a different views path though Blade will look relative to the resources/views directory. In which case you would need @extends('themes.default.layouts.app').

Ad
source: stackoverflow.com
Ad