I am new to Laravel and I am trying to create my first layout for a new site I'm making.
The problem I am having is that content I want in the <head>
is going into <body>
, and <head>
is 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?
Also what is the difference in @yeild
and @section
in my view?