安装 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