title: Laravel Ajax Call Works Local but Not on Server
body: <p>My Laravel Ajax call works locally with XAMPP and Apache, but not on the server (NGINX). All similar questions to this topic could not solve my problem. Does anyone know what the problem might be?</p>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>&lt;?php
  
  public function readHSauswahl(Request $request)
  {
      $data = Message::where('name', '=', $request-&gt;title)-&gt;get();
  
      return response()-&gt;json($data);
  }
  </code></pre>
  
  <p><strong>Route</strong></p>
  
  <pre><code>Route::get('/readHSauswahl', 'AjaxController@readHSauswahl');
  </code></pre>
  
  <p><strong>Ajax</strong></p>
  
  <pre><code>$.ajax({
      type: 'get',
      url:'{!!URL::to('/readHSauswahl')!!}',
      dataType: "json",
      data:{'title':hochschule_name},
      success:function(data){
          console.log(data);
      }
  ...
  </code></pre>