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
Eager loading fixes with proof.
Find N+1 query problems in [controller / page / API resource]. 1. Trace which relationships are accessed inside loops (controllers, Blade views, API Resources, Livewire components). 2. Fix with eager loading (with(), load(), withCount()) only where needed. 3. If useful, suggest enabling Model::preventLazyLoading() in non-production environments. 4. Show the before/after query count from a feature test using DB::enableQueryLog() or similar. Don't change response shape or behaviour.
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
Find N+1 query problems in [controller / page / API resource]. 1. Trace which relationships are accessed inside loops (controllers, Blade views, API Resources, Livewire components). 2. Fix with eager loading (with(), load(), withCount()) only where needed. 3. If useful, suggest enabling Model::preventLazyLoading() in non-production environments. 4. Show the before/after query count from a feature test using DB::enableQueryLog() or similar. Don't change response shape or behaviour.
66 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
Thin controllers with proper authorisation.
Agent task · Cursor / coding agents, Claude Code, ChatGPT +1
Idempotent jobs with retries and tests.
Agent task · Cursor / coding agents, Claude Code, ChatGPT +1