Laravel Queues: Running Jobs in the Background
Anything slow that doesn't need to finish before the response is sent — an email, a report export, a third-party API call — belongs in a queued job, not inline in the request.
GUIDES
Anything slow that doesn't need to finish before the response is sent — an email, a report export, a third-party API call — belongs in a queued job, not inline in the request.
Renaming a column, dropping one, and dropping a foreign key each have a specific gotcha — a dependency on doctrine/dbal for renames on older Laravel, and getting the foreign key's actual constraint name right for drops.
A service is where shared logic and state belong instead of a component — Angular's dependency injection handles creating and sharing a single instance across every place that needs it.
Use MySQL INSERT ... SELECT safely with explicit column mapping, duplicate handling, transactions, locking, deterministic batching, verification, and rollback.
APP_DEBUG in .env, why it must always be false in production, and what actually leaks when it is left on by mistake.
A loop of individual ->save() calls means one query per row — insert() (or upsert() for a merge) does it in one, at the cost of skipping model events and timestamps unless handled manually.
Three separate php.ini directives all cap upload size independently — raising just one and leaving the others at their default is the most common reason this fix doesn't seem to work.
Laravel's remember-me support is built into Auth::attempt() — a single boolean argument, plus one column already present in the default users table migration.
The image upload API itself hasn't meaningfully changed across recent Laravel versions — what genuinely differs in Laravel 10 and 11 is scaffolding and folder structure, not the store() call itself.
Every Eloquent timestamp is already a Carbon instance — the part that actually causes bugs is timezone handling: what gets stored, what gets displayed, and where the conversion between them should happen.
whereBetween() handles the basic case cleanly — the real detail to get right is making sure the end date's time component actually includes the whole day, not just midnight.
A single well-maintained package (endroid/qr-code, wrapped by simple-qrcode) covers this — the actual decisions are output format, error-correction level, and whether to embed a logo.