Support the ongoing development of Laravel.io →
Configuration Views Blade

Hi,

I'm completely new to Laravel, working with it for maybe two or three days on a small/medium project.

I am using the Blade templating engine, and read the Laravel docs on how to use it. So I set

protected $layout = 'layouts.master';

For clarity reasons I know want to change the folder structure of my views/layouts to the following:

views/
-- layouts/
---- admin/
------ admin.blade.php, nav.blade.php, etc.
---- master/
------ master.blade.php, menu.blade.php, footer.blade.php, etc.
...

But as soon as I change the $layout to for example

protected $layout = 'layouts.admin.admin';

I get the following error message:

InvalidArgumentException  
View [layouts.admin] not found.

Same happened when I tried to use

protected $template

instead of

protected $layout

P.S.: Hope I didn't f*ck up the markup :/

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.