Answer the question
In order to leave comments, you need to log in
How to put the settings in a separate file in laravel?
Laravel 5.
The essence of the question is that, depending on where the site is located (local or hosted), it is necessary to change some data in one of the controllers. Those. ideally, move the variable (from which the controller will get this data) to a separate file. Make two copies of this file, one of which will be on the hosting, the other on the local. And the data in this variable will be different. And then, when updating the site, do not touch this file. Those. in the same way as in .env there are settings (for example, connecting to a database).
How to do it? Is there any special mechanism for this in laravel?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question