Layout/Master page in laravel
Making Layout or Master page in laravel is very simple . Go through the given steps below.
Step 1: Make a view named Layout.blade.php
Make a view for layout named layout.blade,php in resources\views folder.
<html>
<head>
<title>@yield('title')</title>
</head>
<body>
<h1>layout Page</h1>
@yield('content')
</html>
Step 2 : Make view index.blade.php
File location : resources\views
@extends('layout')
@section('title',"Home Page")
@section("content")
<h1>Welcome to my Webiste</h1>
@endsection
No comments:
Post a Comment