Pankaj
Pankaj

Reputation: 10095

Load dynamic layout in blade

What I am trying?

I am trying to load a layout file in blade which has dynamic path due to language difference.

I have a class below in Laravel 7.

namespace App\Architecture\Blades;

class BladesList {
    const layout = "themes.default.en.layouts.layout";
}

Below is the code present in blade

@extends('{!!\App\Architecture\Blades\BladesList::layout !!}')

Error Message

No hint path defined for [{!!\App\Architecture\Blades\BladesList].

Upvotes: 1

Views: 151

Answers (1)

IBRAHIM EZZAT
IBRAHIM EZZAT

Reputation: 983

you have to remove {{!! !!}} wrap to be like:

@extends(\App\Architecture\Blades\BladesList::layout)

Upvotes: 2

Related Questions