courses/package-courses

这是 package-courses (项目 HK4 laravel)

2.0.5 2021-07-04 14:10 UTC

This package is auto-updated.

Last update: 2024-09-04 21:30:27 UTC


README

composer require courses/package-courses

步骤 1: 将服务提供者添加到 config/app.php

  1. Courses\Courses\CoursesServiceProvider::class,
  2. Collective\Html\HtmlServiceProvider::class,

步骤 2: 在 config/app.php 中添加类别名

  1. 'Input' => Illuminate\Support\Facades\Request::class,
  2. 'Form' => Collective\Html\FormFacade::class,
  3. 'Html' => Collective\Html\HtmlFacade::class,

步骤 3: 在 config/auth.php 中更改模型提供者类的 Auth 别名

  1. 'model' => Courses\Courses\Models\User::class,

步骤 4: 在数据库/migrations 中删除用户和密码迁移文件

步骤 5: 安装发布

  1. php artisan vendor:publish --provider="Courses\Courses\CoursesServiceProvider" --force

步骤 6: 发布包的配置和资源

  1. php artisan vendor:publish --tag=lfm_config
  2. php artisan vendor:publish --tag=lfm_public

步骤 7: 清除缓存

  1. php artisan route:clear
  2. php artisan config:clear
  3. php artisan storage:link

步骤 8: 迁移和 Seeder

运行以下命令

  1. php artisan migrate
  2. php artisan db:seed