SHARE
TWEET

Untitled

a guest Aug 13th, 2017 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Controller
  2.  public function user_ajukan_uji()
  3.     {
  4.      $user = DB::table('user')
  5.                         ->select('id','nama_user','telp_user','email_user','kategori_user')
  6.                         ->get();
  7.      return Datatables::of($user)
  8.             ->addColumn('Aksi', function($user) {
  9.                 return '<a onclick="('.$user->id.')" class="btn btn-md btn-primary" id="append"><i class="glyphicon glyphicon-arrow-down"></i>Pilih</a>';
  10.             })
  11.             ->make(true);
  12.     }
  13.  
  14. //input box
  15. <div class="col-md-2">
  16. <input type="text" class="form-control" id="search" name="search" placeholder="Masukkan ID User">
  17. </div>
  18.  
  19. //Script
  20. <script>
  21. function append(id){}
  22.     $("#append").click (function(id){
  23.     $("#search").append(".user->id.");
  24. });
  25. </script>
RAW Paste Data
Top