如何在laravel中安裝套件?
<p>我已經創建了一個Laravel項目,現在我正在嘗試使用composer require naoray/laravel-package-maker --dev安裝一個包,但是在安裝過程中出現了錯誤。 <br /><br />這個錯誤是:</p><p><br /></p>
<pre class="brush:none;toolbar:false;">Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires naoray/laravel-package-maker ^4.0 -> satisfiable by naoray/laravel-package-maker[v4.0.0, ..., v4.0.4].
- naoray/laravel-package-maker[v4.0.0, ..., v4.0.4] require illuminate/support ^7.0|^8.0 -> found illuminate/support[v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27] but these were not loaded, likely because it conflicts with another require.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require naoray/laravel-package-maker:*" to figure out if any version is installable, or "composer require napackage:laravel ^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
</pre>
<p>如果有人知道如何解決這個問題,我會非常感謝幫助。 </p>