M
M
mstdoc2021-12-22 00:04:31
PHP
mstdoc, 2021-12-22 00:04:31

Is there some kind of middleware analogue for laravel in relation to the "back"?

Good day.

There is a task on laravel to raise some more or less standard api.
With the authorization of users and the receipt / saving of data - everything is clear here, everything is as usual.

But, there is a nuance.

If we exaggerate greatly, then it consists in the fact that part of the data should lie in the database, and part in another, third-party, in relation to this api project, let's call it api2.
For example, when authorizing users, they must be retrieved from the database.
But, if the user login begins with, say, "test_user_", then such users should be obtained from api2 during authorization.

The same with saving, if the user login starts with test_user_*, then we put it not in the database, but in api2.
The same principle is with the data that should be chased through this api.

Those. you need some kind of middleware, but not from the side of the web, but from the side of the back to the server.
I didn’t find anything by keywords in the search, and I don’t really understand how to correctly formulate a search query.
Tell me, please, in which direction to dig.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vyacheslav Plisko, 2021-12-22
@AmdY

Read about microservices and don't make crutches. Explicitly mark this as an internal user or an external one and explicitly go for data via api to another service.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question