M
M
mrFlyer2016-07-03 13:26:01
Laravel
mrFlyer, 2016-07-03 13:26:01

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

2 answer(s)
M
Muhammad, 2016-07-03
@muhammad_97

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.

N
nepster-web, 2016-07-03
@nepster-web

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 question

Ask a Question

731 491 924 answers to any question