我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

Laravel插入var里面的get函数

Am i doing it wrong, i tried to insert a value inside a global function.

$servz = $revz->service;
$amount = Config::get("prices.".$servz."[0]");

I expect it to be : $amount = Config::get("prices.A1[0]");

Try using the helper to set and get, it uses array notation and is a little easier to follow. So to set a timezone for example:

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

and to get, just:

$value = config('app.timezone');

From the docs - pretty good explanation there.

近期文章

  • 如何显示“用户名”表的值? [重复]
  • 从php中获取分拣结果
  • 在php中的另一个节点中附加xml节点
  • 使用codeigniter将图像插入到bdd中
  • 每周或每月旋转日志,而不是每天
  • 将Array转换为XML(PHP上的simpleXML),添加子项
  • 没有现有订单的产品“已售出”的woocommerce挂钩
  • 如何修复,发布未插入的值。 mysql列是空的
  • 从网站和政策获取数据以获取数据(合法与否)
  • 如何使用ajax php和mysql正确显示进度条
  • 多插入PDO
  • 看起来没有XML文件
  • 如何使用PHP制作firebase动态链接?
  • 在PHP CodeIgniter中读取EXIF
  • .htaccess RewriteRule url只有数字[重复]
  • CSS不希望包含在文件中
  • BigINT和VarChar的区别,长度为16个字符
  • 如何在使用wp_dequeue_style时告诉'handle'的名称
  • onClick事件调用函数,但没有触发
  • 需要使用Redis来计算48小时的分数变化

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华