我已經創建了自定義的基本Laravel包,我已經將它上傳到我的github帳戶,並且還將github回購連接到https://packagist.org。安裝定製laravel包
我的資料庫網址爲https://github.com/johnsmithamk/message.git
我想我的本地服務器上安裝從GitHub新Laravel應用程序包。
我正在使用Laravel verson 5.5。下面是我composer.json
代碼
Composer.json
{
"name": "johnsmithamk/message",
"description": "Sample Package in Vendor folder",
"type": "project",
"license": "0.1",
"authors": [
{
"name": "John Smith",
"email": "[email protected]"
}
],
"minimum-stability": "dev",
"require": {
"Illuminate/support": "~5"
},
"autoload":{
"psr-4":{
"test\\message\\": "vendor/test/message/src/"
}
},
"extra": {
"laravel": {
"providers": [
"test\\message\\MessageServiceProvider"
]
}
}
}
添加存儲庫Packagist它告訴使用這個命令來安裝包後:
composer create-project johnsmithamk/message
但運行上面的命令後,我越來越以下錯誤:
[InvalidArgumentException]
Could not find package johnsmithamk/message with stability stable.
create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]
任何人都可以就如何從GitHub安裝laravel包建議?
請檢查composer.json
的代碼,讓我知道我是否犯了一些錯誤。
你的意思是'作曲家要求......'? –
我試圖通過這兩種方法 - >作曲家需要johnsmithamk /消息和 - >作曲家創建項目johnsmithamk /消息 但沒有工作 – John