📜  如何在 Larvel 中使用我的常量 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:17.701000             🧑  作者: Mango

代码示例1
Create a file constants.php inside app/config/ and put your settings in an array:

 'administrator'
];

Then anywhere in your controllers or views you can get the value by using Config Facade:

echo Config::get('constants.ADMIN_NAME');