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

stephen waweru's avatar

how to trace the api used in a web application using a view or controller in laravel

am trying to find the api used in one system to push data to another system. The api isnt configured in the api.php yet its somewhere in the system's structure.is it possible to trace the api used in a system using the views or the controllers.i understand that after creating data and storing it,then its pushed using an api to another system.i have already configure it on the env file of the target system where data is being pushed. how can i be able to trace the api in the controller or the views.

0 likes
5 replies
sr57's avatar

dont' undestand "after creating data and storing"

Do you know where in the actual code?

If yes, why just recreate the code ?

if no, the only way is to track change in the db with trigger and fire some script(s)

1 like
stephen waweru's avatar

@sr57 in this part "after creating and storing" what i mean is the when i crete and store data in systems A database the API should push the data from system A to system B database.what do you mean with "track change in the db with trigger and fire some script"?

sr57's avatar

@stephen waweru

If you are not able to find/change the code that writes in the db, you have to write some code that detect the changes directly in the db. Depending of the number of table, the frequency of changes, .your need of "real time or not", ... you can write php code or directly some trigger in the db.

sr57's avatar

@stephen waweru

So you can write want you want after each write.

I suggest you to begin with 'dump' and use the package beyondcode/laravel-dump-server and then decide what code to write.

1 like

Please or to participate in this conversation.