Home > OS >  I want to show a page inside another page
I want to show a page inside another page

Time:01-02

Inside first picture, the page name master.blade.php. Where I want to insert header.blade.php coding {{view::make('header')}}. enter image description here

But the render page show this error, saying "Class "view" not found (View: C:\Users\Aman Ullah\ecomm\resources\views\master.blade.php)" enter image description here

I tried different things but failed.

CodePudding user response:

You should not echo a blade file in another blade with view::make, you just need to use @include directive as demonstrated below:

@include('header')
@yield('content')
@include('footer')

CodePudding user response:

If you want to show a page inside another page, then you can simply include the required page like this:

@include('another_blade_file')
  • Related