How to Set Config File Value in Laravel?
In this post we will give you information about How to Set Config File Value in Laravel?. Hear we will give you detail about How to Set Config File Value in Laravel?And how to use it also give you demo for it if it is necessary.
Whenever you need to get configuration files value then you can set using config helper in Laravel 5. In my previous post i added how to get config file value in laravel 5. If you are working on Laravel 4 then you should use Config facade for get and set value of config file. Maybe sometimes we require to set application url from app.php file or database name from database.php file so you can set this way:
Example:
config()->set('app.url','http://localhost:8000');
OR
Config::set('app.url','http://localhost:8001');
Hope this code and post will helped you for implement How to Set Config File Value in Laravel?. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs