How to remove package from laravel

Updated at 05-Sep-2021, By samar

How to remove package from laravel

We’ll attempt to use programming in this lesson to solve the "How to remove package from laravel" puzzle.

You can remove package from laravel project using compser remove command. It will remove package from vendor folder and remove package item from composer.json file.
  • Remove package in laravel

    composer remove package/name


    Step by step instruction to remove package in laravel


    1. To remove package in laravel run composer remove command
    composer remove package/name

    You can change the package name that you want to remove. It will remove the line from composer.json and also files from the vendor folder.


    2. Delete file from config folder

    File path: config\<packageconfiguration>.php

    Delete file under config folder which is related to package.


    3. Delete related tables from database

    Delete tables from the database which are related to the package. You can find the tables name from configuration file which is exists inside config folder.


    4. Remove package items from providers and aliases array in config\app.php if exists

Back to code snippet queries related laravel