Remove a Package from Laravel using Composer

  593 views   1 year ago Laravel

Composer is dependency manager for PHP packages. Laravel also uses composer to install and remove packages from the application.

In this article, we will see how to remove package from your Laravel application. Actually you can remove package from any PHP application which uses composer as package manager. Run the following command and it will remove the package from the application. It will also update composer.json and composer.lock automatically.

composer remove vendor/package

After that, you will also need to remove references to that package within your application, from config, controllers etc. otherwise it may give class not found error because you have removed all class files from application.

Author : Harsukh Makwana
Harsukh Makwana

Hi, My name is Harsukh Makwana. i have been work with many programming language like php, python, javascript, node, react, anguler, etc.. since last 5 year. if you have any issue or want me hire then contact me on [email protected]