Are you looking for the correct way to remove the Laravel package? Yes! then you are the perfect place. In this article, we will see Laravel remove package with proper examples. Are you ready guys? Let’s dive into it.
Laravel Remove Package Using Composer
Let’s suppose, you have already installed the spatie/laravel-permission but after some time you felt that this package is not helpful as per your project requirement. Now you want to remove this Laravel package in the correct way. To do so follow the following steps:
- At the very first step, Remove the
providers
declaration from theconfig/app.php
file. - If you have added the
aliases
then remove it fromconfig/app.php
file. Please check below screenshot.
- Next, If you have added your package references in Controllers, Models, Routes, or any other file then remove it.
- If you have published any vendor-related files then manually delete them. Ignore is you haven’t run any
vendor:publish
command. - At last run, the following command with your vendor and package name to remove the package from the vendor folder, and you are done.
Syntax:
composer remove vendor/packagename
We have spatie
as a vendor and the package name is laravel-permission
. So we can remove the Laravel package as below:
composer remove spatie/laravel-permission
php artisan config:clear // Remove the configuration cache
Additionally, read our guide:
- Laravel One To One Relationship Tutorial
- Laravel One To Many Relationship Tutorial With Example
- Database Records Update In Laravel
- Best Way to Remove Public from URL in Laravel
- Error After php artisan config:cache In Laravel
- Specified Key Was Too Long Error In Laravel
- AJAX PHP Post Request With Example
- How To Use The Laravel Soft Delete
- How To Add Laravel Next Prev Pagination
- How To Print Or Debug Query In Laravel
- Difference Between Factory And Seeders In Laravel
- Laravel: Increase Quantity If Product Already Exists In Cart
- Laravel DataTables Tutorial With Example
- Laravel Send Mail From Localhost
- How To Convert Word To PDF In Laravel
- Laravel Multiple Where Conditions With Example
That’s it for now. We hope this article helped you to learn Laravel package remove with example.
Please let us know in the comments if everything worked as expected, your issues, or any questions. If you think this article saved your time & money, please do comment, share, like & subscribe. Thank you in advance. 🙂 Keep Smiling! Happy Coding!
Exϲellent beat ! I wiѕh t᧐ apprentice whіle you amend your website, how сan i subscrіbe for a blog weƅѕite?
The account hеlped mе a acceptable deal. I had been a little
bit acquainted of thіs your broadcast provided bright clear concept
Hey Linnie,
Thank you for your kind word. We are planning to open a subscribe box very soon along with the Guest Post feature. So stay tuned with us. Thank you:)
Not a unhealthy post, did it take you a lot of your time to consider it?