我需要將我的 zodiac 包從 vendor 文件夾放到我的 laravel 根目錄中的 packages 文件夾中,以便自定義一些數(shù)據(jù)。目前我在根目錄下創(chuàng)建了 packages 文件夾,從 vendor/intervetion 中剪切了我的 zodiac 文件夾并將其粘貼到 packages 文件夾中。然后在我的 composer.json 中,我將代碼放在下面。作曲家.json{ "name": "laravel/laravel", "type": "project", "description": "The Laravel Framework.", "keywords": [ "framework", "laravel" ], "license": "MIT", "require": { "php": "^7.2", "fideloper/proxy": "^4.0", "guzzlehttp/guzzle": "^6.5", "intervention/image": "^2.5", "intervention/zodiac": "dev-master", // HERE I ADDED THIS!!!!! "laravel-notification-channels/messagebird": "^2.1", "laravel/framework": "^6.2", "laravel/socialite": "^4.3", "laravel/tinker": "^2.0", "laravel/ui": "^1.1", "predis/predis": "^1.1" }, "require-dev": { "barryvdh/laravel-debugbar": "^3.2", "facade/ignition": "^1.4", "fzaninotto/faker": "^1.4", "jason-guru/laravel-make-repository": "^0.0.2", "mockery/mockery": "^1.0", "nunomaduro/collision": "^3.0", "phpunit/phpunit": "^8.0" }, "config": { "optimize-autoloader": true, "preferred-install": "dist", "sort-packages": true }, "repositories": [ { "type": "path", "url": "./packages/zodiac" // HERE I ADDED THIS "repositories"!!!!! } ], "extra": { "laravel": { "dont-discover": [] } }, "autoload": { "psr-4": { "App\\": "app/" }, "classmap": [ "database/seeds", "database/factories" ] }, "autoload-dev": { "psr-4": { "Tests\\": "tests/" } },在此之后,當(dāng)我點(diǎn)擊 composer update 和 composer dump-autoload 時(shí),laravel 在 vendor/intervetion 文件夾中創(chuàng)建了新的 zodiac 文件夾,我又開始了。任何幫助表示贊賞。
如何將自定義作曲家包放在 Laravel 的供應(yīng)商文件夾之外?
阿波羅的戰(zhàn)車
2023-03-26 13:41:51