title: Laravel Links to CSS
body: <p>I have this one problem I have been thinking to ask since 2013. I have no idea why I have stayed this long. </p>
  
  <p>In Laravel views, I use <code>{{ URL::asset('css/styles.css') }}</code> to include a CSS file into a template. That works perfectly for links like <code>/users</code>, <code>/tasks</code>, <code>/clients</code>.</p>
  
  <p>However when I access I file from a link like <code>/users/create</code>, <code>/tasks/1/edit</code> I get a problem. It is like the CSS file is not included. These two images will elaborate more.</p>
  
  <p><img src="https://i.stack.imgur.com/HccXa.png" alt="/clients works well">
  <img src="https://i.stack.imgur.com/I7liX.png" alt="/clients/create is not picking up"></p>
  
  <p><strong>Here is create.blade.php file</strong></p>
  
  <pre><code> @extends('template')
  
  @section('content')
  
  &lt;div class="panel panel-white"&gt;
      &lt;div class="panel-heading"&gt;
          &lt;h5 class="panel-title"&gt;Create Client&lt;/h5&gt;
      &lt;/div&gt;
      &lt;div class="panel-body"&gt;
          &lt;p class="text-small margin-bottom-20"&gt;
  
          @if($errors-&gt;has())
          &lt;div class="alert alert-danger"&gt;
              &lt;ul&gt;
                  @foreach ($errors-&gt;all() as $error)
                      &lt;li&gt;{{ $error }}&lt;/li&gt;
                  @endforeach
              &lt;/ul&gt;
          &lt;/div&gt;
          @endif
      &lt;/p&gt;
  
          {{ Form::model($client, array('url'=&gt; $url, 'method'=&gt; $method, 'role'=&gt;'form')) }}
  
              @include('clients._form')
  
          {{ Form::close() }}
      &lt;/div&gt;
  &lt;/div&gt;
  @stop
  </code></pre>
  
  <p><strong>Here is the Client's index.blade.php</strong></p>
  
  <pre><code>@extends('template')
  
  
  @section('content')
  
          &lt;p class="text-small margin-bottom-20"&gt;
              @if(Session::has('success'))
              &lt;div class="alert alert-success"&gt;
                  {{ Session::get('success') }}
              &lt;/div&gt;
              @endif
          &lt;/p&gt;
  
  
  &lt;table class="table table-hover" id="sample-table-1"&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th class="center"&gt;#&lt;/th&gt;
              &lt;th&gt;Company Name&lt;/th&gt;
              &lt;th class="hidden-xs"&gt;Contact Person&lt;/th&gt;
              &lt;th class="hidden-xs"&gt;Email&lt;/th&gt;
              &lt;th&gt;Mobile Number&lt;/th&gt;
              &lt;th&gt;&lt;/th&gt;
              &lt;th&gt;&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          @foreach($clients as $client)
          &lt;tr&gt;
              &lt;td class="center"&gt;{{ $client-&gt;id }}&lt;/td&gt;
              &lt;td class="hidden-xs"&gt;&lt;a href="{{ URL::to('clients/'.$client-&gt;id) }}"&gt;{{ $client-&gt;company }}&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;{{ $client-&gt;firstname." ".$client-&gt;lastname }}&lt;/td&gt;
              &lt;td&gt;{{ $client-&gt;email }}&lt;/td&gt;
              &lt;td&gt;{{ $client-&gt;phone }}&lt;/td&gt;
              &lt;td class="center"&gt;
                  &lt;div class="visible-md visible-lg hidden-sm hidden-xs"&gt;
                      &lt;a href="{{ URL::to('clients/'.$client-&gt;id.'/edit') }}" class="btn btn-primary btn-xs" tooltip-placement="top" tooltip="Edit"&gt;Edit&lt;/a&gt;
  
                  &lt;/div&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  {{ Form::open(array('method'=&gt;'delete','action'=&gt; array('ClientController@destroy',$client-&gt;id))) }}
                      &lt;button class = 'btn btn-danger btn-xs' type="submit"&gt;Delete&lt;/button&gt;                      
                  {{Form::close()}}
              &lt;/td&gt;
          &lt;/tr&gt;
          @endforeach
  
      &lt;/tbody&gt;
  &lt;/table&gt;
  
  
  &lt;span class="pull-right"&gt;{{ $clients-&gt;links() }}&lt;/span&gt;
  @stop
  </code></pre>
  
  <p><strong>Here is the relevant section of my template.blade.php</strong></p>
  
  <pre><code>&lt;!--[if IE]&gt;&lt;meta http-equiv='X-UA-Compatible' content="IE=edge,IE=9,IE=8,chrome=1" /&gt;&lt;![endif]--&gt;
          &lt;meta charset="utf-8" /&gt;
          &lt;meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0"&gt;
          &lt;meta name="apple-mobile-web-app-capable" content="yes"&gt;
          &lt;meta name="apple-mobile-web-app-status-bar-style" content="black"&gt;
          &lt;meta content="" name="description" /&gt;
          &lt;meta content="" name="author" /&gt;
          &lt;!-- end: META --&gt;
          &lt;!-- start: GOOGLE FONTS --&gt;
          &lt;link href="http://fonts.googleapis.com/css?family=Lato:300,400,400italic,600,700|Raleway:300,400,500,600,700|Crete+Round:400italic" rel="stylesheet" type="text/css" /&gt;
          &lt;!-- end: GOOGLE FONTS --&gt;
          &lt;!-- start: MAIN CSS --&gt;
          &lt;link rel="stylesheet" href="{{ URL::asset('vendor/bootstrap/css/bootstrap.min.css') }}"&gt;
          &lt;link rel="stylesheet" href="{{ URL::asset('vendor/fontawesome/css/font-awesome.min.css') }}"&gt;
          &lt;link rel="stylesheet" href="{{ URL::asset('vendor/themify-icons/themify-icons.min.css') }}"&gt;
          &lt;link href="{{ URL::asset('vendor/animate.css/animate.min.css') }}" rel="stylesheet" media="screen"&gt;
          &lt;link href="{{ URL::asset('vendor/perfect-scrollbar/perfect-scrollbar.min.css') }}" rel="stylesheet" media="screen"&gt;
          &lt;link href="{{ URL::asset('vendor/switchery/switchery.min.css') }}" rel="stylesheet" media="screen"&gt;
          &lt;!-- end: MAIN CSS --&gt;
          &lt;!-- start: CLIP-TWO CSS --&gt;
          &lt;link rel="stylesheet" href="{{ URL::asset('assets/css/styles.css') }}"&gt;
          &lt;link rel="stylesheet" href="{{ URL::asset('assets/css/plugins.css') }}"&gt;
          &lt;link rel="stylesheet" href="{{ URL::asset('assets/css/themes/theme-1.css') }}" id="skin_color" /&gt;
          &lt;!-- end: CLIP-TWO CSS --&gt;
          &lt;!-- start: CSS REQUIRED FOR THIS PAGE ONLY --&gt;
          &lt;!-- end: CSS REQUIRED FOR THIS PAGE ONLY --&gt;
      &lt;/head&gt;
      &lt;!-- end: HEAD --&gt;
      &lt;body&gt;
  </code></pre>
  
  <p><strong>EDIT 1</strong>: here is the the link to Logo
  <img src="https://i.stack.imgur.com/zj0Ti.png" alt="Logo"></p>
  
  <p><strong>EDIT 2:</strong> Here is my error log
  <img src="https://i.stack.imgur.com/s6gLj.png" alt="enter image description here"></p>
  
  <p><strong>EDIT 3:</strong> Here are the /clients and /clients/create source code</p>
  
  <p><img src="https://i.stack.imgur.com/eBOwo.png" alt="enter image description here">
  <img src="https://i.stack.imgur.com/c5zsv.png" alt="enter image description here"></p>