User::where('id',$id)->delete();
//or
$user = User::find(1);
$user->delete();
$res=User::where('id',$id)->delete();
use AppModelsFlight;
$flight = Flight::find(1);
$flight->delete();
public function destroy($id){
$res=User::find($id)->delete();
if ($res){
$data=[
'status'=>'1',
'msg'=>'success'
];
}else{
$data=[
'status'=>'0',
'msg'=>'fail'
];
return response()->json($data);