rematnarab rematnarab - 2 months ago 16
PHP Question

Laravel layouts not working

I am trying something really simple and can not get it to work.
I have 2 pages. admin.blade.php and left.blade.php
I am trying to use admin page as the master page. and include date from left.blade.php

The admin pages print only "test" as the result and includes nothing from left.admin.php.
I can`t see what is wrong. Thanks in advance

File structure is

-- resources





<!DOCTYPE html>
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
<meta charset="UTF-8">
<title> @yield('title')</title>
// put your code here


<div id='footer'>

route command in web.php is

Route::get('/admin', function () {
return view('admin');


If you want to include date from left.blade.php you should use @include() directive in admin.blade.php:


If your main content is in left.blade.php and you're using admin.blade.php as layout only then change you route:

Route::get('/admin', function () {
    return view('left');