首页 » 工作 » 方法 » 正文

初始化 laravel 项目.md

发布者:站点默认
2020/10/10 浏览数(33) 分类:方法 初始化 laravel 项目.md已关闭评论

安装 Laravel

composer create-project laravel/laravel ./

修改依赖的下载源

composer global require slince/composer-registry-manager
composer repo:ls
composer repo:use aliyun

添加项目依赖

composer require doctrine/dbal # 增加修改表结构功能
composer require zedisdog/laravel-schema-extend # 增加表注释功能
composer require laravel/passport # OAuth
composer require spatie/laravel-permission # Permission
composer require zedisdog/laravel-schema-extend # Table comment

参数配置

cp .env.example .env
php artisan key:generate
php artisan vendor:publish --tag=passport-migrations
php artisan migrate
php artisan passport:install --force

php artisan vendor:publish --tag="passport-migrations"
php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider"

The given role or permission should use guard api instead of web.
https://learnku.com/laravel/t/16385/user-seed-file-using-user-assignrole-founder-wrong-report

FAQ

PHP Fatal error:  Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in
php -d memory_limit=-1 `which composer` require zedisdog/laravel-schema-extend
点击返回顶部
  1. 留言
  2. 联系方式