Laravel: add a safe database migration
New column/table with indexes, rollback and model updates.
Agent task · Cursor / coding agents, Claude Code, ChatGPT +1
Library / Coding & Technology / Performance
Idempotent jobs with retries and tests.
Move [slow work, e.g. sending invoice PDF email] from the request cycle into a queued job. - Make the job idempotent (safe to run twice). - Set sensible $tries, backoff and timeout; handle failure in failed(). - Pass IDs, not whole models with large relations, unless using SerializesModels intentionally. - Use Queue::fake() / Bus::fake() in tests to assert dispatch, and a separate test for the job's handle(). Explain how to run the worker locally.
Copies your prompt and opens the official site in a new tab. You may need to paste it yourself (Ctrl/⌘ + V). Nothing is sent to the AI by us.
Replace [bracketed] parts with your own details before sending. Want it tailored? Build a custom website & app development prompt.
A typical one-line request compared with this prompt. We only show sample responses where we've written an illustration.
Prompt
performance
1 words · no role, context, format or constraints
Prompt
Move [slow work, e.g. sending invoice PDF email] from the request cycle into a queued job. - Make the job idempotent (safe to run twice). - Set sensible $tries, backoff and timeout; handle failure in failed(). - Pass IDs, not whole models with large relations, unless using SerializesModels intentionally. - Use Queue::fake() / Bus::fake() in tests to assert dispatch, and a separate test for the job's handle(). Explain how to run the worker locally.
74 words · generated instantly from templates, no AI called
What we added
New column/table with indexes, rollback and model updates.
Agent task · Cursor / coding agents, Claude Code, ChatGPT +1
Eager loading fixes with proof.
Agent task · Cursor / coding agents, Claude Code, ChatGPT +1
Thin controllers with proper authorisation.
Agent task · Cursor / coding agents, Claude Code, ChatGPT +1