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 ?
- How to Open URL in New Tab using Jquery?
- Laravel 7.x and 6.x Routing Tutorial
- Ng Bootstrap Modal in Angular 8 Example
- Bootstrap 4 Datepicker in Angular 9/8 Example
- Disable Registration Route in Laravel
- Bootstrap Timepicker in Angular Example
- Count Number of Pages in PDF - PHP Script
- Digital Signature PHP Script Example