Solution for "find using orm laravel"

$res=User::where('id',$id)->delete();

laravel eloquent remove from db

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);

laravel eloquent remove from db

Similar codes for "find using orm laravel"


Latest 'PHP' questions

Added before "find using orm laravel"