Here, you can learn how to get or set configuration variables value in laravel 5 application. There two way to get and set config variable value. You can simply use config helper of laravel or config facade.
Sometimes, It is very important to get some configuration variable value like Domain URL, timezone, email title etc. PHP Laravel framework provide us very simple and easy way to get and set config variable value.
In this article you can see how we can get value of configuration variable:
Get Config Variable Value:
$url = config('app.url');
OR
$url = Config::get('app.url');
Set Config Variable Value:
$url = config('app.url','http://hdtuto.com/');
OR
$url = Config::set('app.url','http://hdtuto.com/');
You can simple try with this!
Do you like below Tutorials ?
- Multidimensional Array Search By Value in PHP
- Laravel Install Font Awesome Icons Example
- How to Use Moment JS in Laravel?
- Angular 9 Get Environment Variables Example
- Angular Delete a Component From Cli Example
- How to Upload File from Local to Server using SSH?
- Angular Use CKEditor Example Tutorial
- How to Use Multiple Select Dropdown in Laravel?