title: Why is the link getting doubled sometimes when I use yajra-datatable for laravel?
body: <p>Most of the time when I select a user in the users list, the link would go &quot;localhost:8000/user/1&quot; but sometimes is goes &quot;localhost:8000/user/user/1&quot;. I can't remove the <code>user</code> in the link <code>data = '&lt;a href=&quot;user/' + data + '&gt;' + data + '&lt;/a&gt;';</code> because most of the time it shows the user page correctly.<br><br>
  This is the code under the UserController</p>
  <pre><code>public function getUsers(Request $request) {
      if ( $request-&gt;ajax() ) {
          ...
          return Datatables::of($data)
              -&gt;addColumn('id', function($row) {
                  return $row['id'];
              })
              -&gt;addColumn('name', function($row) {
                  return $row['name'];
              -&gt;rawColumns(['id', 'name'])
              -&gt;make(true);
      }
  }
  </code></pre>
  <p>This is the script for users index.blade.php</p>
  <pre><code>&lt;script type=&quot;text/javascript&quot;&gt;
      $(function () {
          var table = $('.yajra-datatable').DataTable({
              processing: true,
              serverSide: true,
              ajax: &quot;{{ url('users/list') }}&quot;,
              columns: [
                  {
                      data: 'id',
                      name: 'id',
                      &quot;render&quot;: function(data, type, row, meta) {
                          if(type === 'display'){
                              data = '&lt;a href=&quot;user/' + data + '&gt;' + data + '&lt;/a&gt;';
                          }
  
                          return data;
                      }
                  },
                  {data: 'name', name: 'name'},
              ],
          });
      });
  &lt;/script&gt;
  </code></pre>