How to remove a package from Laravel using composer?

前端 未结 16 2002
[愿得一人]
[愿得一人] 2020-11-28 17:10

What is the correct way to remove a package from Laravel using composer? So far I\'ve tried:

  1. Remove declaration from composer.json (in "requir
16条回答
  •  星月不相逢
    2020-11-28 17:45

    There are quite a few steps here:

    1. Go to composer.json and look for the package and how it is written over there.
    • for example

    { "require": { "twig/twig": "^3.0" } }

    I wish to remove twig 3.0

    1. Now open cmd and run composer remove vendor/your_package_name as composer remove twig/twig this will remove the package.

    2. As a final step run composer update this will surely give you a massage of nothing to install or update but this is important in case your packages have inter-dependencies.

提交回复
热议问题