Model::withoutTimestamps()
Execute operations without touching the updated_at column, useful for bulk imports and data migrations.
Entries tagged with "Database".
Execute operations without touching the updated_at column, useful for bulk imports and data migrations.
Get notified when your cumulative database query time exceeds a threshold during a single request.
Inspect any Eloquent model's columns, relationships, observers, and policy from the command line.
Get exactly one matching item from a collection — or throw an exception. A stricter alternative to first().
Silence all model events within a closure — perfect for seeding, imports, and data migrations where observers would cause side-effects.
Convert an Eloquent Collection back into a query builder scoped to those exact model IDs — bridging collections and queries.
Load aggregated values from related models as attributes — count, sum, min, max, avg — in a single query without loading the relation.