Check out example codes for "laravel withtrashed". It will help you in understanding the concepts better.

Code Example 1

public function category() {
	return $this->belongsTo('App\Category')->withTrashed();
}

Code Example 2

// If there's a flight from Oakland to San Diego, set the price to $99.
// If no matching model exists, create one.
$flight = App\Flight::updateOrCreate(
    ['departure' => 'Oakland', 'destination' => 'San Diego'],
    ['price' => 99, 'discounted' => 1]
);

Code Example 3

<!-mass update-->
App\Models\Flight::where('active', 1)
          ->where('destination', 'San Diego')
          ->update(['delayed' => 1]);

Learn ReactJs, React Native from akashmittal.com