Laravel- remove composer package in laravel
In this article we will learn about how to remove the composer package in laravel, we all know how to install it, but when it’s time to remove the package we don’t know.
Well, there is two way to remove or uninstall the composer package from the laravel.
But before moving forward let’s know what composer is, so basically, the composer is a tool that includes all the dependencies and libraries, or simply you can say it manage dependencies.
Step-1 : In this example we will install dompdf composer package with following command:
composer require barryvdh/laravel-dompdf
Now we will us the below command to remove the composer
composer remove barryvdh/laravel-dompdf
Now you have to clear your config cache , in order to remove the cache file.
php artisan config:clear
Step-2 : By removing your package name
To remove your package name open composer.json file, this file is present in root of your project folder.
Now look for barryvdh/laravel-dompdf (look for your package name) it will under require object, remove that one.
then run the below command
composer dump-autoload