Lumen初始化框架

  • 安装Lumen
composer create-project --prefer-dist laravel/lumen lumen
  • 配置缓存
composer require predis/predis
composer require illuminate/redis
在bootstrap/app.php中添加
    $app->register(Illuminate\Redis\RedisServiceProvider::class);
在bootstrap/app.php中取消注释
    $app->withFacades();

    $app->withEloquent();
  • env配置
APP_TIMEZONE=PRC

DB_CONNECTION=mysql
DB_HOST=120.0.0.1
DB_PORT=3306
DB_DATABASE=test
DB_USERNAME=root
DB_PASSWORD=root
DB_TIMEZONE=+08:00
DB_PREFIX=m_





CACHE_DRIVER=redis

你可能感兴趣的:(Lumen初始化框架)