Reputation: 2729
Is it possible to have the master.blade.php file outside of the template files.
Example below:
views/
master.blade.php
layout/
hello.blade.php
views/layout/hello.blade.php
@extends('layout.master)
I have tried the above but it cannot find the master.blade.php file. So is there a way to refer to a directory above the blade file.
Upvotes: 0
Views: 106
Reputation: 632
it would be
@extends('master')
the "." in the view names indicate folders. so
@extends('my.long.path.to.template')
would be found in:
/views/my/long/path/to/template.blade.php
layouts don't have to be in a folder called layouts
Upvotes: 2