[英]How can I re-use existing array value in custom config file in Laravel?
Let's say I have the following array in "config/custom.php" 假设我在“ config / custom.php”中有以下数组
return array(
'svn_host' => "https://MYSERVERNAME",
'svn_user' => "deployment",
);
Now let's say I add another value, but I want to reuse an existing value from the same array. 现在假设我添加了另一个值,但是我想重用同一数组中的现有值。
return array(
'svn_host' => "https://MYSERVERNAME",
'svn_user' => "deployment",
'cmd' => "svn ls --username [I want to use 'svn_user' here]"
);
Just give it a variable above...its a hack, but it'll work 只是给它上面的一个变量...它是一个hack,但它可以工作
$user = "deployement";
return array(
'svn_host' => "https://MYSERVERNAME",
'svn_user' => $user,
'cmd' => "svn ls --username ".$user
);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.