当前位置:网站首页>Usage of config in laravel
Usage of config in laravel
2022-07-07 16:21:00 【Full stack programmer webmaster】
Laravel Of config Generally store configuration information , Can pass config('key') Method to get the specified data .
The setting value can be set through 「 spot 」 Syntactic reading , It contains the file name to access and the option name .
Now I want to read \config\app.PHP Of documents url, The data in the file is :
'url' => 'http://localhost',Access method :
config('app.url') If you can't find it app.url, The second parameter will be returned by default .
config('app.url', 'default_val')Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/113175.html Link to the original text :https://javaforall.cn
边栏推荐
- Asyncio concept and usage
- Unity3D_ Class fishing project, bullet rebound effect is achieved
- Xcode Revoke certificate
- Laravel constructor and middleware execution order
- 星瑞格数据库入围“2021年度福建省信息技术应用创新典型解决方案”
- markdown公式编辑教程
- U3D_ Infinite Bessel curve
- Vs tool word highlight with margin
- A link opens the applet code. After compilation, it is easy to understand
- iptables只允许指定ip地址访问指定端口
猜你喜欢

95.(cesium篇)cesium动态单体化-3D建筑物(楼栋)

Description of vs common shortcut keys

Power of leetcode-231-2

Vs tool word highlight with margin

Xingruige database was shortlisted as the "typical solution for information technology application and innovation in Fujian Province in 2021"

Apache Doris just "graduated": why should we pay attention to this kind of SQL data warehouse?

Tragedy caused by deleting the console statement

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

【Android -- 数据存储】使用 SQLite 存储数据

融云斩获 2022 中国信创数字化办公门户卓越产品奖!
随机推荐
How can laravel get the public path
A link opens the applet code. After compilation, it is easy to understand
用手机在通达信上开户靠谱吗?这样炒股有没有什么安全隐患
What else can an ordinary person do besides working in a factory to make money?
平衡二叉树(AVL)
Regular expression string
Lecturer solicitation order | Apache seatunnel (cultivating) meetup sharing guests are in hot Recruitment!
laravel怎么获取到public路径
【HCSD大咖直播】亲授大厂面试秘诀-简要笔记
laravel构造函数和中间件执行顺序问题
【花雕体验】15 尝试搭建Beetle ESP32 C3之Arduino开发环境
Three. JS introductory learning notes 19: how to import FBX static model
torch.numel作用
融云斩获 2022 中国信创数字化办公门户卓越产品奖!
PHP中exit,exit(0),exit(1),exit(‘0’),exit(‘1’),die,return的区别
Numpy -- data cleaning
Performance measure of classification model
谈谈 SAP iRPA Studio 创建的本地项目的云端部署问题
PyTorch 中的乘法:mul()、multiply()、matmul()、mm()、mv()、dot()
Statistical learning method -- perceptron