当前位置:网站首页>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
边栏推荐
- 2022山东智慧养老展,适老穿戴设备展,养老展,山东老博会
- Numpy -- epidemic data analysis case
- How to implement backspace in shell
- Postman generate timestamp, future timestamp
- asyncio 概念和用法
- LeetCode1_ Sum of two numbers
- PyTorch 中的乘法:mul()、multiply()、matmul()、mm()、mv()、dot()
- 融云斩获 2022 中国信创数字化办公门户卓越产品奖!
- Three singleton modes of unity (hungry man, lazy man, monobehavior)
- leetcode 241. Different Ways to Add Parentheses 为运算表达式设计优先级(中等)
猜你喜欢

持续创作,还得靠它!

分步式監控平臺zabbix

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

Virtual memory, physical memory /ram what

JS array foreach source code parsing

AE learning 01: AE complete project summary

Lecturer solicitation order | Apache seatunnel (cultivating) meetup sharing guests are in hot Recruitment!

Mesh merging under ue4/ue5 runtime

LeetCode3_ Longest substring without duplicate characters

Strengthen real-time data management, and the British software helps the security construction of the medical insurance platform
随机推荐
Sysom case analysis: where is the missing memory| Dragon lizard Technology
讲师征集令 | Apache SeaTunnel(Incubating) Meetup 分享嘉宾火热招募中!
The inevitable trend of the intelligent development of ankerui power grid is that microcomputer protection devices are used in power systems
Ue4/ue5 multi thread development attachment plug-in download address
torch. Numel action
Is it reliable to open an account on Tongda letter with your mobile phone? Is there any potential safety hazard in such stock speculation
UE4 exports the picture + text combination diagram through ucanvasrendertarget2d
markdown公式编辑教程
【花雕体验】15 尝试搭建Beetle ESP32 C3之Arduino开发环境
C4D learning notes 1- animation - animation key frames
95.(cesium篇)cesium动态单体化-3D建筑物(楼栋)
121. 买卖股票的最佳时机
laravel 是怎么做到运行 composer dump-autoload 不清空 classmap 映射关系的呢?
Communication mode between application program and MATLAB
Vite path alias @ configuration
Unity3D_ Class fishing project, bullet rebound effect is achieved
Bidding announcement: 2022 Yunnan Unicom gbase database maintenance public comparison and selection project (second) comparison and selection announcement
U3D_ Infinite Bessel curve
Good news! Kelan sundb database and Hongshu technology privacy data protection management software complete compatibility adaptation
招标公告:福建省农村信用社联合社数据库审计系统采购项目(重新招标)