Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

thuleni's avatar

App/API Reverse Engineering

!. I am totally new to Laravel, however have many years of IT behind me. 2. I have inherited an application and API after joining my new company and have spent quite a bit of time trying to get my head around the code/Laravel/Model/etc. I think I have an understanding now. 3. The original developers did a great job in developing both these systems, however over the years (since around 2019) quite a few people have had a go at "hacking around the system/code" to get certain things to work. 4. I would like to get everything back into a standard format and back to following Laravel methodologies as closely as possible. The first thing to do is reverse engineer the whole system so that the DB models are all where they belong, etc. It there such a tool please?

Alternatively, any/all advice is gladly accepted.

0 likes
10 replies
tykus's avatar

No tool is going to automatically refactor for hacking around the system; use existing tests and/or write new test for the existing functionality and attack the problem piece-by-piece.

thuleni's avatar

@tykus Thank you for your frank reply. So one cannot even take the MySQL database and create new models from it?

tykus's avatar

@thuleni the generation of models is only a small part of application development; the API endpoints, business rules etc. are going to be much a more extensive body of work.

1 like
thuleni's avatar

@Sinnbeck Cheers - that will at least standardise the models. Thank you for the pointer.

martinbean's avatar

@thuleni No, there isn’t a tool that will do your work for you. If you want to move files to standard locations etc then you’re going to have to do that yourself. No tool is going to accurate guess where you want files; especially in a mature project.

thuleni's avatar

@martinbean I understand, and I guess that's what I will have to do. I will start off with a new project and pull the code to where I guess it should go and take it from there.

martinbean's avatar

@thuleni If you just need to move files around then move them around? That’s going to much quicker and better use of your time than a Great Big Rewrite™.

Otherwise you‘re just going to want to start from scratch yet again in a couple of years’ time when the new codebase gets unwieldy because you’ve cut corners to meet deadlines because you were re-platforming at the same time as trying to get new features out of the door.

And codebase only rots if you let it. So take the time to ensure you keep on top of technical debt :)

Please or to participate in this conversation.