我可以从 laravel 中删除 sail 吗?
Can i remove sail from laravel?
最近接到任务升级旧的laravel项目,有一个控制器,需要迁移的文件不超过20个,平均200行代码。
为此,我安装了 laravel 最新的 8.1,但它带有很多垃圾,包括风帆。我只需要 laravel-5.4(支持 php-8)和 mysql(没有帆、邮件和其他东西)。
我可以从中移除风帆吗,我在 google 的第一页找不到好的文档来使用最小 laravel 所以我来了。
我不是有意冒犯任何人,但 laravel 我认为有很多糟糕的抽象概念让我感到沮丧。
您可以使用 composer
删除任何包
composer remove vendor/package
移除 Sail 的示例
❯ composer remove laravel/sail
laravel/sail could not be found in require but it is present in require-dev
Do you want to remove it from require-dev [yes]? yes
./composer.json has been updated
Running composer update laravel/sail
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 0 updates, 1 removal
- Removing laravel/sail (v1.13.2)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 0 updates, 1 removal
- Removing laravel/sail (v1.13.2)
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: barryvdh/laravel-debugbar
...
Discovered Package: spatie/laravel-ignition
Package manifest generated successfully.
> @php artisan vendor:publish --tag=laravel-assets --ansi
No publishable resources for tag [laravel-assets].
Publishing complete
修改供应商文件夹后,更新 auloader 并从 composer.json
中删除 laravel/sail
行
最近接到任务升级旧的laravel项目,有一个控制器,需要迁移的文件不超过20个,平均200行代码。
为此,我安装了 laravel 最新的 8.1,但它带有很多垃圾,包括风帆。我只需要 laravel-5.4(支持 php-8)和 mysql(没有帆、邮件和其他东西)。
我可以从中移除风帆吗,我在 google 的第一页找不到好的文档来使用最小 laravel 所以我来了。
我不是有意冒犯任何人,但 laravel 我认为有很多糟糕的抽象概念让我感到沮丧。
您可以使用 composer
删除任何包composer remove vendor/package
移除 Sail 的示例
❯ composer remove laravel/sail
laravel/sail could not be found in require but it is present in require-dev
Do you want to remove it from require-dev [yes]? yes
./composer.json has been updated
Running composer update laravel/sail
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 0 updates, 1 removal
- Removing laravel/sail (v1.13.2)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 0 updates, 1 removal
- Removing laravel/sail (v1.13.2)
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: barryvdh/laravel-debugbar
...
Discovered Package: spatie/laravel-ignition
Package manifest generated successfully.
> @php artisan vendor:publish --tag=laravel-assets --ansi
No publishable resources for tag [laravel-assets].
Publishing complete
修改供应商文件夹后,更新 auloader 并从 composer.json
laravel/sail
行