Suppose I have a price_list
option that I set in to null
in the app.php
file:
'price_list' => null,
price_list
should be set based on some conditions when my app is run. for example if logged in user has administrator
role then I should fetch appropriate value from a price_list
table:
if (Some Condition){
$pricelist = fetch from price_list table
Config::set('price_list' ,$price_list);
}
So here, I found that to do that I should use a service provider and then do all those functionalities as mentioned in this Answer. But I do not know which approach is right to use boot or register method and singleton or bind method?