title: Laravel 5 - Add a stylesheet only if on a certain page/controller (page specific asset)
body: <p>My Laravel layout is currently as follows (removed navbar etc..):</p>
  
  <pre><code>&lt;link href="//maxcdn.bootstrapcdn.com/bootswatch/3.3.4/flatly/bootstrap.min.css" 
       rel="stylesheet"&gt;
  &lt;link href="{{ asset('/css/app.css') }}" rel="stylesheet"&gt;
  
  &lt;!-- Fonts --&gt;
  &lt;link href='//fonts.googleapis.com/css?family=Roboto:400,300' rel='stylesheet' 
      type='text/css'&gt;
  
  &lt;!-- Scripts --&gt;
  &lt;script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"&gt;&lt;/script&gt;
  
  &lt;!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --&gt;
  &lt;!-- WARNING: Respond.js doesn't work if you view the page via file:// --&gt;
  &lt;!--[if lt IE 9]&gt;
      &lt;script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"&gt;&lt;/script&gt;
      &lt;script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"&gt;&lt;/script&gt;
      &lt;![endif]--&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
      &lt;div class="container"&gt;
  
          @yield('content')
  
      &lt;/div&gt;
  
      &lt;!-- Scripts --&gt;
      &lt;script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"&gt;&lt;/script&gt;
      &lt;script src="{{ asset('assets/vendor/toastr/toastr.min.js') }}"&gt;&lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Then I attach a view to the layout:</p>
  
  <pre><code>@extends('app')
  
  @section('content')
  
  Content here.
  
  @endsection
  </code></pre>
  
  <p>I'm confused as to, say for example, if I'm in the <code>clinicController.php</code> or within a clinic route (it's a resource), then to "inject" a stylesheet and a Javascript file into the appropriate places.</p>
  
  <p>Is there a way to do this? I'd imagine that <code>@if on a certain page, display this</code> would work, but I'm sure there must be a more "Laravel" way to do it?</p>
  
  <p>Any help would be hugely appreciated.</p>