By default, Laravel has a layouts folder inside the views folder, i.e. app/views/layouts , and in this folder you save layout files, i.e. app/views/layouts/index.master.php , and if you have something similar you should use something like:
@extends('layouts.master') @section('content') <p>Page Content</p> @stop
This inherits / uses the master.blade.php file (as a layout) from the layouts folder, here layouts.master means layouts/master.blade.php .
In your master.blade.php file you have this
@yield('content')
So, the data / content from the view between @section('content') and @stop will be reset instead of @yield('content') your layout.
You can use any name for your layout file, if it is layouts/main.blade.php , then you should use
@extends('layouts.main')
The alpha
source share