Try
<html>
<head>
<title>@yield('title')</title>
</head>
<body>
@yield('content')
</body>
<html>
@extends('layouts.master')
@section('title')
Some title
@stop
@section('content')
<p>The content here</p>
@stop
return View::make('someview');
You might be able to put the title section on 1 line. I haven't tried
Sorry I misread. I thought your issue was you were looking for alternatives to coupling your views to your controllers. What you've done looks fine. I'm not sure of the advantages are over using a template language though.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community