How to Delete Multiple Records using Checkbox in Laravel
public function deleteAll(Request $request)
{
$ids = $request->ids;
DB::table("products")->whereIn('id',explode(",",$ids))->delete();
return response()->json(['success'=>"Products Deleted successfully."]);
}
//@sujay
Also in PHP:
- PHP Warning
- data time on php
- CONTAIN PHP
- check if strcontains
- date format Y-m-d H:i:s
- $url = $_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"];
- Laravel catch TokenMismatchException
- click confirm before submit form php
- bootswatch import theme into laravell vuejs
- convert string to uppercase in php
- eloquent unique combination
- Find ip address location php
- laravel::all()->distinct()->get();
- decode Base64 File php
- check if string exists in string php
- echo ternary php
- composer create laravel
- adding header function to href php
- file_get_contents php ssl
- current domain in php
- current date and time in php
- PHP dynamic property name
- como instalar php ubuntu 20.04
- find a character in a string php