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 | 0 | 0.00 | No | View Edit Remove | ||
2 | 0 | 0.00 | No | View Edit Remove | ||
3 | 0 | 0.00 | No | View Edit Remove | ||
4 | 269319 | J9I98UF87-A6RBYHYTE-URJG5G49N | 1.44 | No | View Edit Remove | |
5 | 269319 | JHYSQ2Z4N-AB8DYMXHE-V51SZ3AXN | 1.44 | No | View Edit Remove | |
6 | 269319 | MYYXF28G4-C5C9O7HHY-3O2GGR7LN | 1.44 | No | View Edit Remove | |
7 | 269319 | NIFMY6UH3-CFMU4D25E-3R6D0LRK6 | 1.44 | No | View Edit Remove | |
8 | 269319 | OF4FW4C6V-CWX6P42TE-3WEAR6R86 | 1.44 | No | View Edit Remove | |
9 | 269319 | PCWBXTQ5Z-DES7F0THE-41SH7KDW6 | 1.44 | No | View Edit Remove | |
10 | 269319 | PGMGFVUP3-DGR4YFE5E-42DWBTLK6 | 1.44 | No | View Edit Remove |