I am new to Laravel and I am trying to create my first layout for the new site that I am doing.
The problem is that the content that I want in <head>is in <body>, but <head>empty.
I have:
layout.blade.php
<!DOCTYPE html>
<html>
<head>
<title>@section('title')</title>
{{ HTML::style('https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css'); }}
</head>
<body>
<h1>@yield('h1')</h1>
@yield('content')
{{ HTML::script('js/jquery-1.11.1.min.js'); }}
{{ HTML::script('https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js'); }}
</body>
</html>
users.blade.php
@extends('layouts.layout')
@section('title')
Users Page - 1
@section('h1')
<?PHP echo $h1;?>
@stop
Where am I going wrong?
And what is the difference in @yeildand @sectionin my opinion?
source
share