当前位置:网站首页>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
边栏推荐
- What are compiled languages and interpreted languages?
- Virtual memory, physical memory /ram what
- 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
- 深度之眼(六)——矩阵的逆(附:logistic模型一些想法)
- Lecturer solicitation order | Apache seatunnel (cultivating) meetup sharing guests are in hot Recruitment!
- Three singleton modes of unity (hungry man, lazy man, monobehavior)
- MySQL中, 如何查询某一天, 某一月, 某一年的数据
- 修改配置文件后tidb无法启动
- Leetcode-136-只出现一次的数(用异或来解答)
- numpy--疫情数据分析案例
猜你喜欢
企业级日志分析系统ELK
Three. JS introductory learning notes 18: how to export JSON files with Blender
Three. JS introductory learning notes 05: external model import -c4d into JSON file for web pages
Continuous creation depends on it!
Talk about the cloud deployment of local projects created by SAP IRPA studio
torch.numel作用
Three. JS introductory learning notes 19: how to import FBX static model
A wave of open source notebooks is coming
Unity3D_ Class fishing project, control the distance between collision walls to adapt to different models
Enterprise log analysis system elk
随机推荐
leetcode 241. Different Ways to Add Parentheses 为运算表达式设计优先级(中等)
招标公告:盘锦市人民医院盘锦医院数据库维保项目
企业级日志分析系统ELK
Numpy --- basic learning notes
Enterprise log analysis system elk
2022山东智慧养老展,适老穿戴设备展,养老展,山东老博会
【花雕体验】15 尝试搭建Beetle ESP32 C3之Arduino开发环境
分类模型评价标准(performance measure)
A JS script can be directly put into the browser to perform operations
航運船公司人工智能AI產品成熟化標准化規模應用,全球港航人工智能/集裝箱人工智能領軍者CIMC中集飛瞳,打造國際航運智能化標杆
TS as a general cache method
Three. JS introductory learning notes 00: coordinate system, camera (temporarily understood)
[wechat applet] Chapter (5): basic API interface of wechat applet
持续创作,还得靠它!
Three. JS introductory learning notes 15: threejs frame animation module
Shandong old age Expo, 2022 China smart elderly care exhibition, smart elderly care and aging technology exhibition
Plate - forme de surveillance par étapes zabbix
Three. JS introductory learning notes 05: external model import -c4d into JSON file for web pages
asyncio 概念和用法
Unity的三种单例模式(饿汉,懒汉,MonoBehaviour)