N
N
naneri2015-02-09 14:06:58
Laravel
naneri, 2015-02-09 14:06:58

How to use config based on website name in Laravel 4.2?

The situation is this - there is a code written in Laravel 4.2.
Designed for several sites with the same functionality, but different domain names. Accordingly DB configs are different.
How to use detectenvironment in the start.php file depending on the domain name?
(And then it applies configs depending on the Hostname of the computer - but I have all the domains on one computer).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
IceJOKER, 2015-02-09
@IceJOKER

stackoverflow.com/questions/20669462/changing-defa... - may be?
but in general, you can pass an anonymous function to detectEnv .... and already on the basis of HTTP_HOST return different values

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question