title: laravel 5.2 pass id with onclick not working on delete()
body: <p>Why i can not passing data with id,when i execute the code just null on delete()
  I missed something help me :( 
  This is my dataController</p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers;
  use App\topic; //use model topic
  use Illuminate\Http\Request;
  use Yajra\Datatables\Datatables; //datatable
  use App\Http\Requests;
  use Carbon\Carbon;
  
  class dataController extends Controller
  {
      public function listPerintah($list,Request $request)
      {
          switch ($list) {
              case 'delete':
                  $id = $request['id'];
                  $topic = topic::find($id);
                  $topic-&gt;delete();
                  return $topic-&gt;name.'Berhasil Dihapus'; 
                  break;
  
              default:
                  return view('datatable.index');
                  break;
          }
      }
  
      //dataTable
      public function listData(Request $request)
      {   
          $table = topic::select(['topics.*', 'users.name as user_name'])
              -&gt;join('users', 'users.id', '=', 'topics.user_id')
              -&gt;get();
  
          $datatables = Datatables::of($table);
          if($keyword = $request-&gt;get('search')['value'])
          {
              $datatables-&gt;filterColumn('rownum', 'whereRaw', '@rownum + 1 like ?', ["%{$keyword}%"]);
          }
          return $datatables
                  -&gt;editColumn('user_name', function($table) {
                      return 'Oleh: '. $table-&gt;user_name;
                  })
                  -&gt;editColumn('created_at', function($table) {
                      return Carbon::parse($table-&gt;created_at)-&gt;format('d F Y H:i:s');
                  })
                  -&gt;addColumn('action',function($table){
                      return
                      '&lt;a title="hapus" href="javascript:" onclick="deleteBtn('.$table-&gt;id.',\''.$table-&gt;title.'\')" class="btn btn-fill btn-xs btn-danger"&gt;&lt;span class="fa fa-remove"&gt;&lt;/span&gt;&lt;/a&gt;
                      &lt;a title="ubah" href="'.url("datatable/edit?id=".$table-&gt;id).'"  
                      class="btn btn-xs btn-primary"&gt;&lt;span class="fa fa-pencil"&gt;&lt;/span&gt;
                      &lt;/a&gt;' ;
                  })
                  -&gt;make(true);
      }
  
  
  }
  </code></pre>