当前位置:网站首页>Laravel 中config的用法
Laravel 中config的用法
2022-07-07 14:06:00 【全栈程序员站长】
Laravel的config下一般存放配置信息,可以通过config('key')方法获取指定的数据。
设置值可通过「点」式语法读取,其中包含要访问的文件名以及选项名称。
现在想读取\config\app.PHP文件的url,文件中数据为:
'url' => 'http://localhost',获取方法:
config('app.url')如果找不到app.url,会返回默认返回第二个参数。
config('app.url', 'default_val')发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/113175.html原文链接:https://javaforall.cn
边栏推荐
- The inevitable trend of the intelligent development of ankerui power grid is that microcomputer protection devices are used in power systems
- Function: JS Click to copy content function
- After UE4 is packaged, mesh has no material problem
- 121. 买卖股票的最佳时机
- 统计学习方法——感知机
- 航天宏图信息中标乌鲁木齐某单位数据库系统研发项目
- 尤雨溪,来了!
- 无线传感器网络--ZigBee和6LoWPAN
- Three. JS introductory learning notes 11:three JS group composite object
- Vs tool word highlight with margin
猜你喜欢

Rongyun won the 2022 China Xinchuang digital office portal excellence product award!

Vs tool word highlight with margin

分步式監控平臺zabbix

深度之眼(六)——矩阵的逆(附:logistic模型一些想法)

Shipping companies' AI products are mature, standardized and applied on a large scale. CIMC, the global leader in port and shipping AI / container AI, has built a benchmark for international shipping

LeetCode1_ Sum of two numbers

Good news! Kelan sundb database and Hongshu technology privacy data protection management software complete compatibility adaptation
![[flower carving experience] 15 try to build the Arduino development environment of beetle esp32 C3](/img/8f/ca9ab042916f68de7994d9f2124da9.jpg)
[flower carving experience] 15 try to build the Arduino development environment of beetle esp32 C3

Unity3D_ Class fishing project, control the distance between collision walls to adapt to different models

尤雨溪,来了!
随机推荐
Shipping companies' AI products are mature, standardized and applied on a large scale. CIMC, the global leader in port and shipping AI / container AI, has built a benchmark for international shipping
Postman generate timestamp, future timestamp
航天宏图信息中标乌鲁木齐某单位数据库系统研发项目
2022山东智慧养老展,适老穿戴设备展,养老展,山东老博会
修改配置文件后tidb无法启动
Description of vs common shortcut keys
Three. JS introductory learning notes 00: coordinate system, camera (temporarily understood)
Aerospace Hongtu information won the bid for the database system research and development project of a unit in Urumqi
Three. JS introductory learning notes 07: external model import -c4d to JSON file for web pages -fbx import
星瑞格数据库入围“2021年度福建省信息技术应用创新典型解决方案”
Three. JS introductory learning notes 0: illustration of how webgl and threejs work
Migration and reprint
A JS script can be directly put into the browser to perform operations
Bidding announcement: 2022 Yunnan Unicom gbase database maintenance public comparison and selection project (second) comparison and selection announcement
Application example of infinite list [uigridview]
Talk about the cloud deployment of local projects created by SAP IRPA studio
Simple understanding and application of TS generics
Vite path alias @ configuration
Three. JS introductory learning notes 05: external model import -c4d into JSON file for web pages
Multiplication in pytorch: mul (), multiply (), matmul (), mm (), MV (), dot ()