lumen 自定义函数 helpers.php 使用

  1. 在bootstrap文件夹中创建helpers.php,位置:bootstrap/helpers.php
    写入两个函数
  1. 在bootstrap/app.php文件中加载
bootstrap();

date_default_timezone_set(env('APP_TIMEZONE', 'UTC'));

3.使用函数

你可能感兴趣的:(lumen 自定义函数 helpers.php 使用)