Welcome Guest, Not a member yet? Register   Sign In
configuration files as array?
#2

(This post was last modified: 10-22-2020, 07:55 AM by T.O.M..)

config('Config\TestConfig') returns instance of Config class. You cannot convert it to array as you want.

You may make your own array variable with needed keys and pass it to view call:
PHP Code:
$config config('Config\TestConfig');

$data = [
   'captcha' => $config->captcha
];

echo 
view('login'$data); 
Reply


Messages In This Thread
configuration files as array? - by dumefuko - 10-22-2020, 01:27 AM
RE: configuration files as array? - by T.O.M. - 10-22-2020, 06:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB