im_possy_bull
0
Q:

laravel withtrashed

public function category() {
	return $this->belongsTo('App\Category')->withTrashed();
}
1
<!-mass update-->
App\Models\Flight::where('active', 1)
          ->where('destination', 'San Diego')
          ->update(['delayed' => 1]);
1
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);
0

New to Communities?

Join the community