title: URL() return 404 using JQuery ajax
body: <p>I'm trying to POST login using JQuery ajax but return 404 on routes/web.php. Using routes/api.php return the same.</p>
  
  <p>routes/web.php</p>
  
  <pre><code>Route::post('dashboard/login', 'MsServiceAdvisorController@login');
  </code></pre>
  
  <p>routes/api.php</p>
  
  <pre><code>Route::post('ms-sa/login','MsServiceAdvisorController@login');
  </code></pre>
  
  <p>MsServiceAdvisorController@login</p>
  
  <pre><code>public function login(Request $request) {
      $username = $request-&gt;username;
      $password = $request-&gt;password;
  
      $sa = msServiceAdvisor::where('username',$username)-&gt;get();
      $loginPassword = Crypt::decryptString($sa[0]['password']);
      if ($sa-&gt;count() == 0) {
          $result[] = array(
              'status' =&gt; 'username not found'
          );
      } else {
          if ($loginPassword == $password) {
              $result[] = array(
                  'status' =&gt; 'success',
                  'username' =&gt; $sa[0]['username'],
                  'nama' =&gt; $sa[0]['nama'],
              );
          } else {
              $result[] = array(
                  'status' =&gt; 'wrong password'
              );
          }
      }
  
      return $result;
  }
  </code></pre>
  
  <p>Jquery ajax</p>
  
  <pre><code>$.ajax({
    url: "{{ url('/dashboard/login') }}",
    method: "post",
    data: $(this).serialize(),
    success: function(result) {
      console.log(result);
    }
  });
  </code></pre>
  
  <p>That code return something like this in browser console</p>
  
  <pre><code>POST http://127.0.0.1:8000/dashboard/%7B%7B%20url('/dashboard/login')%20%7D%7D 404 (Not Found)
  </code></pre>
  
  <p>Whats wrong with that? I'm new to laravel.</p>