title: ajax datatable laravel Linking
body: <p>I have a datatable using yajrabox package with links to various strings. When I click on a link, it takes me to a 404 page with "/teams/"string". How do I make this string a viewable page? I have tried using a slug, but I could be using it incorrectly and honestly I don't know where my error is. Here is the impt. parts of my code:</p>
  
  <p>Route:</p>
  
  <pre><code>Route::get('/teams/display/{$slug}', 'TeamsController@display');
  </code></pre>
  
  <p>TeamsController:</p>
  
  <pre><code>public function display($slug)
  {
      $teamdatas = LoserData::findBySlugOrFail($slug);
  
  
  
      return view('teams/display', compact('teamdatas'));
  
  }
  </code></pre>
  
  <p>DataTable.blade</p>
  
  <pre><code>      {data: 'homeTeam', name: 'homeTeam', "fnCreatedCell": function (nTd, sData, oData, iRow, iCol) {
          $(nTd).html("&lt;a href=/teams/display/"+oData.homeTeam+"&gt;"+oData.homeTeam+"&lt;/a&gt;");
          }},
  </code></pre>
  
  <p>teams/display.blade.php</p>
  
  <pre><code>&lt;div class="container"&gt;
  &lt;div class="row"&gt;
      &lt;div class="col-sm-8"&gt;
          &lt;h1&gt; Welcome the {{$teamdatas-&gt;slug}} profile page&lt;/h1&gt;
  
  
  
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>