showing results for - "ajax delete laravel"
Juliette
29 Jul 2018
1//route
2Route::delete('/dashboard/booking/deletebooking/{id}','ResourceController@deletebooking')->name('works.deletebooking');
3
4//resource controller
5public function deletebooking($id){
6    $booking = Booking::where('id','=',$id)->get();
7    $booking->delete();
8
9    return response()->json(['success' => true],200);
10}
11
12//javascript 
13$.ajax(
14        {
15            url: "/dashboard/booking/deletebooking/"+id,
16            dataType: "JSON",
17            type: 'DELETE',
18            data: {
19                '_token': $('meta[name=csrf-token]').attr("content"),
20            },
21            success: function ()
22            {
23                console.log("it Work");
24            }
25        });
queries leading to this page
delete ajax call on laravel 8delete ajax laraveldelete record using ajax in laravel 8laravel ajax delete dataajax delete laraveldelete with ajax laravelhow to pass delete in laravel 8 with ajax call ajax laravel resurce deletedelete by ajax in laraveldelete in laravel using ajaxlaravel ajax delet requestlaravel 8 ajax deletelaravel ajax delete exampledelete record using jquery ajax in laravelhow to delete data using ajax laravellaravel delete ajaxajax click a tag delete laravel 8laravel ajax delete recordjquery ajax delete method laravel net 3a 3aerr delete funtion with ajax in laravelajax delete laravel 8add delete method to ajax laravellaravel delete ajax jquerydelete ajax in laravel 5ajax delete request laravelafter ajax delete data not removing in laravellaravel 8 destroy with ajax requestfsoft delte in ajax laraveldelete laravel ajaxthis remove ajax laravelinsert update delete using ajax in laravelajax delete quer run in laravelajax delete method laraveldelete by ajax laravellaravel jquery ajax deletedelete function in ajax through laraveldelete laravel 8 ajax datatablesoft delete in ajax laravellaravel delete using ajax data not removed until refreshajax delete in laravelhow to use destroy function with ajax laravel laravel ajax deletedelete laravel 8 ajaxajax delete request laravel 8 routejquery ajax delete method laravelhow to delete record using ajax in laraveljquery ajax delete form in laravel 8ajax delete data laraveldelete data ajax laraveldelete with ajax call laravel 8laravel datatables delete using ajaxdelete record with ajax laraveldelete method ajax laravelajax delete laravel