Download Laravel-xCRUD Integration Full Code that includes this full demo
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class BulkDeleteController extends Controller
{
public function index()
{
$xcrud = Xcrud_get_instance();
$xcrud->table('million');
$xcrud->limit_list('20,50,100,1000'); // do not use 'all' for large tables
$xcrud->bulk_select_position('left'); //It can be 'left' or 'right'
$xcrud->set_bulk_select(false);
$xcrud->set_bulk_select(false,'cd_key','=','EBGC57SXM-VW47I6AF-401X7DYM');//Dont be able to select records with ID 287846
$xcrud->unset_remove(true,'cd_key','=','EBGC57SXM-VW47I6AF-401X7DYM');
$xcrud->create_action('bulk_delete', 'bulk_delete'); // action callback, function publish_action() in functions.php
$render = $xcrud->render();
return view('xcrud_simple', ['render' => $render]);
}
}
| # | User Id | Cd Key | Sum | Activated | ||
|---|---|---|---|---|---|---|
| 1 | 269319 | 8SH8KK2S7-4NDA3VATE-E1F5KLG9N | 1.44 | No | View Edit Remove | |
| 2 | 269319 | 9RFV1WRJR-55UWF9C5E-FL970T9LN | 1.44 | No | View Edit Remove | |
| 3 | 269319 | AM5GI88HJ-5M3LB16TE-GYAUHA09N | 1.44 | No | View Edit Remove | |
| 4 | 269319 | C486UTMON-6EP45I9HE-JCNSXQMXN | 1.44 | No | View Edit Remove | |
| 5 | 269319 | CLKFLLK0N-6NV8SQ9HE-K4CQ7MMXN | 1.44 | No | View Edit Remove | |
| 6 | 269319 | CSIPPIIL-ISIGGS45E-5OAKARQK6 | 1.44 | No | View Edit Remove | |
| 7 | 269319 | CZOPTU55-J31GWAZHE-5RH0NASW6 | 1.44 | No | View Edit Remove | |
| 8 | 269319 | D4R3KHOS7-6Y0I1AATE-KYZQB0G9N | 1.44 | No | View Edit Remove | |
| 9 | 269319 | DHYPWIQP3-75014RE5E-LK3AWJZLN | 1.44 | No | View Edit Remove | |
| 10 | 269319 | DPK9XJKW7-790P8EGTE-LW86C6M9N | 1.44 | No | View Edit Remove |