Convert Html Template in Laravel Structure

Convert Html Template in Laravel Structure

  1. Create header.blade.php in layouts folder
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <title>Title</title>

   // Paste all css link are here

</head>

2. Create footer.blade.php in layouts folder

// all javascript script here 

3. Create master.blade.php in layouts folder

<!DOCTYPE html>
<html lang="en">
    @include('layouts.header')
        <body>

            // Header <div></div> Code Are Here

            @yield('content')

            // Footer <div></div> Code Are Here
                
        </body>
    @include('layouts.footer')
</html>

4. Create dashboard.blade.php outside layouts folder

@extends('layouts.master')

@section('title')
   Project Title 
@stop

@section('style')
     // write css code here 
@stop

@section('content')

    //Main dashboad wrapper content will be here

@stop

@section('script')
    // write javascript code here 
@stop

0 Comments

Leave a Reply

You must be logged in to post a comment.