Menu

Finding the code to change in a Laravel app, without reading every file
πŸ“°

Finding the code to change in a Laravel app, without reading every file

DEV Community: laravelΒ·Makra GergΕ‘Β·10 days ago
#p942Jhs7
#devtolaravel#devto#dev#organization#contacts
Long article (817 words) β€” no AI summary yet.
Reading 0:00
15s threshold

I use Claude Code a lot on Laravel projects. What bugs me is not the code it writes, it's how much it reads before it writes anything. Open the controller, open the model, grep for the relation, open a Vue page, grep again.

So I built callgraph, a small tool that indexes the project once and then answers short questions about it. I want to show what that looks like on a real project instead of explaining it. I used pingcrm , the Laravel + Inertia demo app, because anyone can clone it and check.

The task

When an organization is deleted, its contacts should be soft deleted too. Restoring the organization should bring them back.

Small task, but you need to know a few things first: where organizations get deleted, how the relation to contacts is defined, and who else touches that relation.

Step 1: where do I start?

The agent passes the words from the task to locate :

$ callgraph.sh locate organization delete contacts locate: 3 terms Β· 275 matches in 24 files Β· start here ↓ 1.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.