Blade Templating @extend Go Up A Folder
Alright so I know about the Blade
@extends method to enter a folder, but how about leaving one to enter another? How would that be achieved?
index.blade.php is in
app/views and my
master.blade.php (The layout file) is in
app/views/layouts I use the
@extends function like:
Which results in the application going into the
layouts folder as expected.
But now, I have the following directory structure;
app/ views/ errors/ 404.blade.php layouts/ master.blade.php index.blade.php
Now what I want to do is use
@extends to have the
404.blade.php extend the
master.blade.php but I have no idea as to how to "go up a folder".
TL:DR How do I go up one folder in the
@extends is relative to the root of your view directory.
So when you do
@extends('layouts.master'), it will always be
views/layouts/master.blade.php no matter the location of the view that is extending it.
In other words, you change nothing and just do:
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → October CMS - Conditionally Load a Different Page
- → How to disable assets combining on development in OctoberCMS
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → OctoberCms component: How to display all ID(items) instead of sorting only one ID?
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?