title: How Pass route() into datatables button like Edit and Delete
body: <p>I have list table <code>pegawai</code> from DataTables and I have add edit and delete button into it but still static <code>&lt;a href="pegawai/view/'.$pegawais-&gt;id_pegawai.'"</code> if user type manual and at the end there is <code>/</code> like <code>example.com/pegawai/</code> it will become <code>example.com/pegawai/pegawai/edit/{id}</code>
  so I want use route() is it can ? because I've try it and just render string inside <code>class</code> tag</p>
  
  <p>Here's my full DataTales code</p>
  
  <pre><code>public function data(Request $req)
      {
          DB::statement(DB::raw('set @rownum=0'));
          $pegawai = Pegawai::select(
              DB::raw('@rownum  := @rownum  + 1 AS rownum'),
              "pegawai.id_pegawai",
              "pegawai.nama",
              "pegawai.nip",
              "pegawai.id_jabatan",
              "pegawai.id_unit_kerja",
              "jabatan.nama_jabatan",
              "unit_kerja.nama_unit_kerja"
              )
          -&gt;Join("jabatan","pegawai.id_jabatan","=","jabatan.id_jabatan")
          -&gt;join("unit_kerja","pegawai.id_unit_kerja","=","unit_kerja.id_unit_kerja");
  
          $datatables = Datatables::of($pegawai)
              -&gt;addColumn('action', function ($pegawais) {
                  return '
                  &lt;a href="pegawai/view/'.$pegawais-&gt;id_pegawai.'" class="btn btn-sm btn-primary"&gt;&lt;i class="fa fa-eye"&gt;&lt;/i&gt;&lt;/a&gt;
                  &lt;a href="pegawai/edit/'.$pegawais-&gt;id_pegawai.'" class="btn btn-sm btn-warning"&gt;&lt;i class="fa fa-edit"&gt;&lt;/i&gt;&lt;/a&gt; 
                  &lt;a href="pegawai/delete/'.$pegawais-&gt;id_pegawai.'" class="btn btn-sm btn-danger"&gt;&lt;i class="fa fa-trash"&gt;&lt;/i&gt;&lt;/a&gt;
                  &lt;a href="pegawai/cetak_data/'.$pegawais-&gt;id_pegawai.'" class="btn btn-sm btn-success"&gt;&lt;i class="fa fa-print"&gt;&lt;/i&gt;&lt;/a&gt;
                  ';
              })
              -&gt;editColumn('id_pegawai', '{{ $id_pegawai }}');
  
          if ($keyword = $req-&gt;get('search')['value']) {
              $datatables-&gt;filterColumn('rownum', 'whereRaw', '@rownum  + 1 like ?', ["%{$keyword}%"]);
          }
  
          return $datatables-&gt;make(true);
      }
  </code></pre>
  
  <p>How do I pass route() in DataTables like <code>&lt;a href="{{ route("pegawai.edit", $pegawai-&gt;id_pegawai) }}"</code></p>