Laravel 8 , Laravel 7 , Laravel , Laravel 6
In this example, I will learn you how to remove package in laravel.you can easy and simply remove package in laravel.
you have already installed the yajra/laravel-datatables-oracle 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 the config/app.php file
If you have added the aliases then remove it from config/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.
composer remove vendor/packagename
We have yajra as a vendor and the package name is laravel-datatables-oracle. So we can remove the Laravel package as below:
composer remove yajra/laravel-datatables-oracle
php artisan config:clear
It will help you...