I'm trying to set and return a layout that's attached to a controller. I can successfully set the content for @yeild('content') but I cannot both set and return the template. I can either return the template, with no content set, or I can return the set content, with no layout template.
master.blade.php
<html>
<head>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
@yield('styles')
</head>
<body>
<div class="container">
<h1>Google Earth project!</h1>
<a href="http://laravel.com/docs/quick">Saucey sauce for laravel</a>
<hr>
<h4>Content</h4>
@yield('content')
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
@yield('scripts')
</body>
</html>
HotspotController.php
...
public function show($uid, $lid, $hid)
{
// $this->layout->content = View::make('hotspot.profile');
$this->layout->content = 'a string';
return $this->layout;
}
....