How to Remove Package In Laravel ?
Hi Guys,
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:
Step 1.
At the very first step, Remove the providers declaration from the config/app.php file
Step 2.
If you have added the aliases then remove it from config/app.php file. Please check below screenshot.
Step 3.
Next, If you have added your package references in Controllers, Models, Routes, or any other file then remove it.
Step 4.
If you have published any vendor-related files then manually delete them. Ignore is you haven’t run any vendor:publish command.
Step 5.
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 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...
- How to Notifications With database Driver in Laravel 11?
- How to Send Email Via Notification in Laravel 11?
- How to Install and Configure Laravel 11 Debugbar?
- How to Like Dislike System in Laravel 11?
- How to Paginate a Model with Relationship in Laravel 11?
- Laravel 11 Upload Files to Amazon S3 Example
- Laravel 11 Send WhatsApp Messages Example
- Laravel 11 Rest API Authentication Using JWT Tutorial