title: Why I can't obtain the complete path of a CSS resource in a blade template?
body: <p>I am very new in Laravel. I am working on a Laravel 5.4 application and I have the following problem using blade to retrieve the comple URL of a CSS resource.</p>
  
  <p>This is my <strong>app.blade.php</strong> file representing the template of all my views:</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;Document&lt;/title&gt;
      &lt;!--&lt;link href="/css/app.css" rel="stylesheet"&gt;--&gt;
      &lt;!--&lt;link href="{{ URL::asset('css/app.css') }}" rel="stylesheet" type="text/css" &gt;--&gt;
      &lt;link href="{{ asset('css/app.css') }}" rel="stylesheet" type="text/css" &gt;
      &lt;link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"&gt;
  
      &lt;script src="/js/app.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
      &lt;div class="container" style="width: 60%; margin-bottom: 50px;"&gt;
          @yield('content')
      &lt;/div&gt;
  
      @yield('footer')
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>As you can see, folloing this SO post: <a href="https://stackoverflow.com/questions/28214499/laravel-5-not-finding-css-files">Laravel 5 not finding css files</a></p>
  
  <p>I am defining this CSS resource in this way:</p>
  
  <pre><code>&lt;link href="{{ asset('css/app.css') }}" rel="stylesheet" type="text/css" &gt;
  </code></pre>
  
  <p>to retrieve the <strong><a href="http://localhost/HotelRegistration/public/css/app.css" rel="nofollow noreferrer">http://localhost/HotelRegistration/public/css/app.css</a></strong> resource from the correct place.</p>
  
  <p>The problem is that doing in this way opening an URL like <a href="http://localhost/HotelRegistration/public/registration" rel="nofollow noreferrer">http://localhost/HotelRegistration/public/registration</a></p>
  
  <p>I still obtain the wrong CSS link in the generated page, this one:</p>
  
  <pre><code>&lt;link href="/css/app.css" rel="stylesheet"&gt;
  </code></pre>
  
  <p>Doing in this way I expected to obtain the correct one <strong><a href="http://localhost/HotelRegistration/public/css/app.css" rel="nofollow noreferrer">http://localhost/HotelRegistration/public/css/app.css</a></strong></p>
  
  <p>I also tried to import it using this alternative link:</p>
  
  <pre><code>&lt;link href="{{ URL::asset('css/app.css') }}" rel="stylesheet" type="text/css" &gt;
  </code></pre>
  
  <p>but I am obtaining the same results.</p>
  
  <p>What is wrong? What am I missing? How can I fix this issue and obtain the correct url of my CSS including the entire path?</p>