Example #1
0
 public function getList()
 {
     $table = Contact::select(['id', 'name', 'phone', 'cellphone', 'email'])->whereCustomerId(Auth::customer()->user()->id);
     $datatable = Datatables::of($table)->addColumn('action', function ($table) {
         return '<a href="' . $table->id . '" class="btn btn-warning">Editar</a>
                     <a href="#" data-url="/admclient/' . self::NAMEC . '/delete/' . $table->id . '" class="btn btn-danger action_delete" data-id="' . $table->id . '" >Eliminar</a>';
     });
     return $datatable->make(true);
 }