Friday, October 27, 2017

Laravel Normal Template / Theme Mastering

1st go to recourse > views and create directory one is front and 2nd is admin
2nd on front folder create on directory home and a php file master.blade.php
3rd copy all code of your template index.html and past on master.blade.php
4th go to routes >web.php and check the root. make get and load a view at /  with a controller and function


5th on home directory create a file home-content.blade.php
on  home-content.blade.php
@extends('front.master')

Title dynamic:
@section('title')    RAN - IT
    @endsection

and master.blade.php 
@yield('title')

==================================
How to get style and images

go to public create 2 directory one is front and another admin
and past all css, images, js file on front folder. 

sec dynamic:
{{asset('/front/')}} before /in front folder or file.
=====================================
for href dynamic:
{{url('/')}} root directory


another way 
{{URL::to('/')}} Here URL is class

another way:
{{route('/')}}

=================================
for fix section:
we will create a folder name includes on front folder

and all commerce section will go on here like header, sidebar etc. 
then we will use @include and i will not use @yield and @section

We will just past the html code on header , footer sidebar etc.

Thank You.










1 comment: