Answer the question
In order to leave comments, you need to log in
What is the preloader mechanism in Laravel5?
Hello.
In Laravel 5, I need to look at which subdomain the user is on before initializing the session. Pull the domain model out of the database and install it in the facade, and modify the session config.
What class/mechanism is responsible for this? Where is this logic implemented?
Thanks in advance.
Answer the question
In order to leave comments, you need to log in
Create a service provider and set it in the config (config/app.php) in the providers section BEFORE the session provider. Better yet, extend the Laravel class and write the necessary logic there. In this case, the standard provider must be removed.
The logic is most likely in the middleware. Here is "Pull the domain model from the database and install it in the facade, and modify the session config." sounds a little doubtful. Try to explain your task in more detail. You may not need to install anything in the facade.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question