I am working with Laravel 4 and I need to set some database queries in configuration files. For example:
config/prod/queries.php
config/stage/qieries.php
And I want to call them like
DB::connection ( 'mysql' )->select ( Config::get('queries.test'););
The case is that my query has some params and some filters. For example:
select * from table where some_date between '$today' and '$tomorrow'
And if I just put this query in the config files and call it, of course exception for unknown variables $today
and $tomorrow
occures.
How can I do this ?