laravel find or fail update code example
Example 1: laravel delete where
DB::table('users')->where('id', $id)->delete();
Example 2: update query in laravel eloquent
$data = DB::table('cart')
->where('crt_id', $id)
->update(['crt_status' =>'0']);
Example 3: larave Soft Deletes
Schema::table('flights', function (Blueprint $table) {
$table->softDeletes();
});
Example 4: laravel eloquent fill
$flight->fill(['name' => 'Flight 22']);