lazyou/laravel-quick

There is no license information available for the latest version (v1.0.0) of this package.

Installs: 3

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:JavaScript

v1.0.0 2022-08-15 14:22 UTC

This package is auto-updated.

Last update: 2024-04-27 06:36:31 UTC


README

安装使用

composer require lazyou/laravel-quick

php artisan vendor:publish --tag=quick [--force]
php artisan queue:table
php artisan quick:install

用户认证 config/auth.php

  • 'model' => App\Models\User::class, 改成 'model' => \Lazyou\Quick\Models\QuickUser::class,

【常用】 config, env 配置操作

  • php artisan key:generate

  • config/app.php => 'locale' => 'zh'

  • CACHE_DRIVER=redis -- 缓存放 redis,查看也方便

  • LOG_CHANNEL=daily -- 错误日志按天记录到 log 文件

  • APP_TIMEZONE=Asia/Shanghai

后台开发

  • app/Providers/RouteServiceProvider.phpboot 方法添加如下

    $adminPath = config('quick.admin_path', 'admin');
    Route::middleware(['web', 'quick.auth', 'quick.log'])
        ->prefix("/$adminPath")
        ->group(base_path('routes/quick_admin.php'));
  • touch routes/quick_admin.php

    Route::get('/example', [ExampleController::class, 'index'])->name('admin.example.index');
  • 视图路由必须设置 name, 用作视图渲染和权限管理