This is a very dirty way of doing it. Config files are suppose to be static. These values are constants and should not change on run time.
To achieve what you need i think it's better to write a service rather than using a middleware. The service shall set all the configuration for the current tenant when initialized.
So, basically If a create a JobServiceProvider will be enough, but I don't know exactly how to do it. It's possible you help me out? Make a example or anything like that?
i made a similar system using this tutorial http://culttt.com/2014/03/31/multi-tenancy-laravel-4/ hope it helps
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community