Kmspico Download | Official KMS Activator Website [New Version 2024] Fast and Easy Converter YouTube to MP3 Online KMSAuto Net Activator Download 2024 Immediate Byte Pro Neoprofit AI Blacksprut without borders. Discover new shopping opportunities here where each link is an entrance to a world ruled by anonymity and freedom.

How to Delete Multiple Records in Laravel?

Keywords :- Delete Multiple Records in Laravel 6.0, Delete Multiple Records in Laravel 5.8, Delete Multiple Records in Laravel 5.7, Delete Multiple Records in Laravel 5.6, Delete Multiple Records in Laravel 5.5, Delete Multiple Records in Laravel 5.4, Delete Multiple Records in Laravel 5.3, Delete Multiple Records in Laravel 5.2, Delete Multiple Records Using Laravel Framework, Delete Multiple Rows Using Laravel


Step 1:- First you create a blade file (contactlist.blade.php). Then after that you display the list of your contact information with checkbox. After that define the url in the form.

Step 2:- Add the form url to the route file of web.php.

Step 3:- After that you create a controller named deletefileController.php and in this file create query of how to delete your multiple records by Laravel.


<!DOCTYPE html>
<title>How to Delete Multiple Records in Laravel?</title>
<h1>How to Delete Multiple Records in Laravel?</h1>
<form method="post" action="{{url('multiplerecordsdelete')}}">
{{ csrf_field() }}
<div class="box-body">
<th><input type="checkbox" id="checkAll"> Select All</th>
<th>Ckecked box</th>
<th>User Name</th>
foreach ($list as $key => $value) {
$name = $list[$key]->name;
<td><input name='id[]' type="checkbox" id="checkItem" value="<?php echo $list[$key]->id; ?>">
<?php $i++; }?>
<input type="submit" name="submit" value="Delete All Data"/>
<script type="text/javascript" src=""> </script>
<script language="javascript">
$("#checkAll").click(function () {
$('input:checkbox').not(this).prop('checked', this.checked);




Route::get('contactlist', function () {
$list = DB::table('contact')->orderby('id', 'desc')->get();
return view('contactlist')->with('list', $list);
Route::post('multiplerecordsdelete', 'deletefileController@multiplerecordsdelete');




namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\User;
use App\Http\Controllers\Controller;
use DB;
use Redirect;
use View;
use File;
class deletefileController extends Controller
public function multiplerecordsdelete(Request $req)
$id = $req->id;
foreach ($id as $ke) {
DB::table('contact')->where('id', $ke)->delete();
return redirect()->back()->with('message','Successfully Delete Your Multiple Selected Records.');;