F
F
fman22019-06-02 22:27:57
Laravel
fman2, 2019-06-02 22:27:57

Laravel. How to correctly configure the class depending on the user's settings?

Hello. Project on Laravel.
I have a class that requires configuration depending on the user's settings.
I understand that simply putting it in the register () of the service provider will not work, because the authenticated user is not available there, because. providers work earlier. What to do in this case, so as not to fence a separate factory and not call it manually.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
JhaoDa, 2019-06-02
@fman2

For example, the way Laravel does it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question