Table of Contents
Inside this article we will see how to remove a installed composer package from laravel 8 application. When we work with application according to use we generally install several composer packages. If not needed then we uninstall or remove composer package from laravel 8 setup.
When composer package installs it updates composer.json file in laravel application. Also when we remove any package updates that file.
This tutorial will be very easy to understand and also easy to remove compose package from your application. We will see all steps to remove composer package in laravel 8 in a very detailed way.
- How To Get Current Location Details in Laravel 8 Tutorial
- How to Get Files Information From Directory in Laravel 8
- How to Get Logged in User Data in Laravel 8 Tutorial
- How to Install Vue js in Laravel 8 Tutorial
Let’s get started.
Remove Composer Package Steps
There are few steps we need to follow to remove a composer package in a proper way.
- Remove Package Providers and Aliases (if any)
- Remove Package Files
- Clear Cached Config
Step #1 – Remove Provider and Alias
If you have added any provider line in providers and alias line in aliases array of /config/app.php file.
You need to remove those manually from app.php.
You can take an example like this –
'providers' => [ ... Maatwebsite\Excel\ExcelServiceProvider::class, ], 'aliases' => [ ... 'Excel' => Maatwebsite\Excel\Facades\Excel::class, ]
Step #2 – Remove Package Files & Dependencies
When you install any composer package it installs several files. So to remove those files in a proper way from application, here is the syntax of composer command to remove any package.
$ composer remove <packageName>
$ composer remove maatwebsite/excel
Step #3 – Clear Config
Next, we need to clear cached config from application.
$ php artisan config:clear
Successfully, you can remove a composer package from laravel application in a proper way.
We hope this article helped you to learn How to Remove Composer Package in Laravel 8 Tutorial in a very detailed way.
Find More on Laravel 8 Articles here
- How to Create Multi Language Website in Laravel 8
- How To Read XML File in Laravel 8 – Example
- How To Upload And Save XML Data in Laravel 8
- Laravel 8 Ajax Post Request Tutorial
- Laravel 8 Authentication using Jetstream with Inertia Js
- Laravel 8 Authentication using Jetstream with Livewire
- Laravel 8 Authentication with Breeze Tutorial
- Laravel 8 Clear Cache of Route, View & Config
- Laravel 8 Cron Job Task Scheduling Tutorial
- Laravel 8 DataTable Ajax Pagination with Search And Sort
- Laravel 8 Firebase Push Notification Tutorial
- Laravel 8 Form Validation Methods
- Laravel 8 Installation Guide – PHP Framework
- Laravel 8 Layouts And Views Complete Guide
- Laravel 8 Routing Tutorial Step by Step Guide
- Laravel 8 Send Mail using Gmail SMTP Server
- Laravel 8 Send Push Notification to Android Using Firebase
- Laravel 8 Send Push Notification to IOS Using Firebase
- Laravel 8 Stub Customization