How to access the configuration values in laravel?

By | June 6, 2018

Click here for more interview questions
configuration values stored in the app.php

get the configuration value using the below code

$value = config(‘app.timezone’);

set the configuration value using the below code
To set configuration values at runtime, pass an array to the config helper:

config([‘app.timezone’ => ‘America/Chicago’]);

Click here for more interview questions