当前位置:网站首页>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
边栏推荐
- leetcode 241. Different ways to add parentheses design priority for operational expressions (medium)
- PHP实现微信小程序人脸识别刷脸登录功能
- Limit of total fields [1000] in index has been exceeded
- 星瑞格数据库入围“2021年度福建省信息技术应用创新典型解决方案”
- 讲师征集令 | Apache SeaTunnel(Incubating) Meetup 分享嘉宾火热招募中!
- 应用程序和matlab的通信方式
- SPI master rx time out中断
- Communication mode between application program and MATLAB
- Markdown formula editing tutorial
- logback.xml配置不同级别日志,设置彩色输出
猜你喜欢
Mysql database basic operation DQL basic query
Strengthen real-time data management, and the British software helps the security construction of the medical insurance platform
Apache Doris刚“毕业”:为什么应关注这种SQL数据仓库?
Numpy -- data cleaning
平衡二叉树(AVL)
Xingruige database was shortlisted as the "typical solution for information technology application and innovation in Fujian Province in 2021"
The unity vector rotates at a point
Logback日志框架第三方jar包 免费获取
Eye of depth (VII) -- Elementary Transformation of matrix (attachment: explanation of some mathematical models)
过度依赖补助,大客户收款难,冲刺“国产数据库第一股”的达梦后劲有多足?
随机推荐
Shader basic UV operations, translation, rotation, scaling
TiDB For PostgreSQL和YugabyteDB在Sysbench上的性能对比
企业级日志分析系统ELK
SysOM 案例解析:消失的内存都去哪了 !| 龙蜥技术
The differences between exit, exit (0), exit (1), exit ('0 '), exit ('1'), die and return in PHP
What are compiled languages and interpreted languages?
What about the pointer in neural network C language
Continuous creation depends on it!
hellogolang
Mysql database backup script
pycharm 终端部启用虚拟环境
AE learning 01: AE complete project summary
修改配置文件后tidb无法启动
Iptables only allows the specified IP address to access the specified port
laravel构造函数和中间件执行顺序问题
2022山东智慧养老展,适老穿戴设备展,养老展,山东老博会
Xcode Revoke certificate
L'application à l'échelle de la normalisation mature des produits ai des compagnies maritimes, cimc, leader mondial de l'intelligence artificielle portuaire et maritime / intelligence artificielle des
山东老博会,2022中国智慧养老展会,智能化养老、适老科技展
Regular expression string