Laravel - Getting Started - Mass Updates
Updates can also be performed against models that match a given query. In this example, all flights that are
active and have a
San Diego will be marked as delayed:
Flight::where('active', 1) ->where('destination', 'San Diego') ->update(['delayed' => 1]);
update method expects an array of column and value pairs representing the columns that should be updated.
When issuing a mass update via Eloquent, the
updatedmodel events will not be fired for the updated models. This is because the models are never actually retrieved when issuing a mass update.