Laravel

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.

  1. By using the command
  2. By removing your package name

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

Shaiv Roy

Hy Myself shaiv roy, I am a passionate blogger and love to share ideas among people, I am having good experience with laravel, vue js, react, flutter and doing website and app development work from last 7 years.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button