Today, We want to share with you Laravel Blade Layouts Folder Structure.In this post we will show you Simple Laravel Layouts using Blade Template, hear for Create Layout Using Laravel Blade Templating Engine we will give you demo and example for implement.In this post, we will learn about Laravel Layouts Folder Structure Using Blade with an example.
Laravel Blade Layouts Folder Structure
There are the Following The simple About Laravel Blade Layouts Folder Structure Full Information With Example and source code.
As I will cover this Post with live Working example to develop Larave 5.8 Blade Layout with Example, so the laravel blade template bootstrap Directory structures for this example is following below.
Step 1: Laravel Routing
Route::get('/', function() { return View::make('shops.home'); }); Route::get('sitemap', function() { return View::make('shops.sitemap'); }); Route::get('Products', function() { return View::make('shops.Products'); }); Route::get('privacy', function() { return View::make('shops.privacy'); });
Step 2: Views
The Laravel File Structure
- app -- views --- layouts ------- default.blade.php ------- category.blade.php --- shops ------- home.blade.php ------- sitemap.blade.php ------- Products.blade.php ------- privacy.blade.php --- includes ------- head.blade.php ------- header.blade.php ------- footer.blade.php ------- category.blade.php
Step 3: Includes
head.blade.php
Welcome To Pakainfo.com
header.blade.php
footer.blade.php
© Copyright 2013 Jaydeep Gondaliya (Pakainfo.com)
Step 4: Default Layout and Pages (Home, Privacy)
@include('includes.head')@include('includes.header') @yield('content')
Step 5: Home Page and Privacy Page
shops/home.blade.php
@extends('layouts.default') @section('content') We are the home page @stop
shops/privacy.blade.php
@extends('layouts.default') @section('content') We are the privacy page @stop
Step 6: Sidebar Layout and Pages
Sidebar Include
includes/category.blade.php
Sidebar Layout
layouts/category.blade.php
@include('includes.head')@include('includes.header') @include('includes.category')@yield('content')
Step 7: Sitemap and Products Pages
shops/sitemap.blade.php
@extends('layouts.category') @section('content') We are the sitemap page @stop
shops/Products.blade.php
@extends('layouts.category') @section('content') We are the Products page @stop
Web Programming Tutorials Example with Demo
Read :
Summary
You can also read about AngularJS, ASP.NET, VueJs, PHP.
I hope you get an idea about Laravel Blade Layouts Folder Structure.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.