PHPackages                             bagisto/bagisto-package-generator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bagisto/bagisto-package-generator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bagisto/bagisto-package-generator
=================================

Bagisto Package Generator

v2.1.2(10mo ago)45181.4k↓48.9%19MITPHP

Since Mar 22Pushed 10mo ago7 watchersCompare

[ Source](https://github.com/bagisto/bagisto-package-generator)[ Packagist](https://packagist.org/packages/bagisto/bagisto-package-generator)[ RSS](/packages/bagisto-bagisto-package-generator/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (5)DependenciesVersions (6)Used By (0)

Bagisto Package Generator
=========================

[](#bagisto-package-generator)

1. Introduction
---------------

[](#1-introduction)

Bagisto Package Generator will create a sample package for you with a single command

It packs in lots of demanding features that allows your business to scale in no time:

- Create package with a single command.

2. Requirements
---------------

[](#2-requirements)

- **Bagisto**: v2.3 or higher.

3. Installation
---------------

[](#3-installation)

### Install with composer

[](#install-with-composer)

Go to the root folder of **Bagisto** and run the following command

```
composer require bagisto/bagisto-package-generator
```

> That's it, now just execute the project on your specified domain.

4. Summary
----------

[](#4-summary)

After setting up, you will see that there are list of package commands which help you to make your package creation smooth.

Below are the list of commands,

S. No.CommandsInfoRequired ArgumentsOptional Arguments01.package:make[Create a new package.](#1-create-a-new-package)package-name--force, --plain02.package:make-admin-controller[Create a new admin controller.](#2-create-a-new-admin-controller)controller-name, package-name--force03.package:make-admin-route[Create a new admin routes file.](#3-create-a-new-admin-routes-file)package-name--force04.package:make-shop-controller[Create a new shop controller.](#4-create-a-new-shop-controller)controller-name, package-name--force05.package:make-shop-route[Create a new shop routes file.](#5-create-a-new-shop-routes-file)package-name--force06.package:make-model[Create a new model class.](#6-create-a-new-model-class)model-name, package-name--force07.package:make-model-proxy[Create a new model proxy class.](#7-create-a-new-model-proxy-class)model-proxy-name, package-name--force08.package:make-model-contract[Create a new model contract.](#8-create-a-new-model-contract)model-contract-name, package-name--force09.package:make-migration[Create a new migration class.](#9-create-a-new-migration-class)migration-name, package-name10.package:make-seeder[Create a new seeder class.](#10-create-a-new-seeder-class)seeder-name, package-name--force11.package:make-request[Create a new request class.](#11-create-a-new-request-class)request-name, package-name--force12.package:make-middleware[Create a new middleware class.](#12-create-a-new-middleware-class)middleware-name, package-name--force13.package:make-datagrid[Create a new datagrid class.](#13-create-a-new-datagrid-class)datagrid-name, package-name--force14.package:make-repository[Create a new repository class.](#14-create-a-new-repository-class)repository-name, package-name--force15.package:make-provider[Create a new service provider class.](#15-create-a-new-service-provider-class)provider-name, package-name--force16.package:make-event[Create a new event class.](#16-create-a-new-event-class)event-name, package-name--force17.package:make-listener[Create a new listener class.](#17-create-a-new-listener-class)listener-name, package-name--force18.package:make-notification[Create a new notification class.](#18-create-a-new-notification-class)notification-name, package-name--force19.package:make-mail[Create a new mail class.](#19-create-a-new-mail-class)mail-name, package-name--force20.package:make-command[Create a new command class.](#20-create-a-new-command-class)command-name, package-name--force21.package:make-payment[Create a new payment class.](#21-create-a-new-payment-class)payment-name, package-name--force22.package:make-shipping[Create a new shipping class.](#22-create-a-new-shipping-class)shipping-name, package-name--force23.package:make-module-provider[Create a new module service provider class.](#23-create-a-new-module-service-provider-class)provider-name, package-name--force24.package:make-payment-method[Create a new payment method package.](#24-create-a-new-payment-method-package)payment-package-name--force25.package:make-payment-method-provider[Create a new payment method service provider class.](#25-create-a-new-payment-method-service-provider-class)provider-name, payment-package-name--force26.package:make-shipping-method[Create a new shipping method package.](#26-create-a-new-shipping-method-package)shipment-package-name--force27.package:make-shipping-method-provider[Create a new shipping method service provider class.](#27-create-a-new-shipping-method-service-provider-class)provider-name, shipment-package-name--force28.package:make-vite-config[Create a new vite config file.](#8-create-a-new-vite-config-file)package-name--force29.package:make-tailwind-config[Create a new tailwind config file.](#8-create-a-new-tailwind-config-file)package-name--force30.package:make-postcss-config[Create a new post css config file.](#8-create-a-new-post-css-config-file)package-name--force31.create-a-new-theme-for-admin[Create a new theme for admin.](#32-create-a-new-theme-for-admin)theme-name--force**--force** : To overwrite the files

**--plain** : When you need only directory structure template, files are not included when this argument is passed

5. Usage
--------

[](#5-usage)

### Let's get started with our first command

[](#lets-get-started-with-our-first-command)

#### 1. Create a new package

[](#1-create-a-new-package)

This command will generate all the necessary files which previously you create manually for your package.

```
php artisan package:make ACME/TestPackage
```

For e.g., If you want to create a package which named as '**TestPackage**', then you need to use the command like this,

```
php artisan package:make ACME/TestPackage
```

This will create whole directory structure for you automatically so that you don't want to do manually like registering routes, views, etc.

##### New package with just directory structure

[](#new-package-with-just-directory-structure)

If you want to do things manually only need folder structures, then there is a optional argument known as '**plain**'. Below is the sample,

```
php artisan package:make ACME/TestPackage --plain
```

##### New package with force command

[](#new-package-with-force-command)

If somehow folder or package is already present, then simple command won't work. So to overcome this problem we need to use force command.

```
php artisan package:make ACME/TestPackage --force
```

#### 2. Create a new admin controller

[](#2-create-a-new-admin-controller)

This command will generate a new controller for your admin portion.

```
php artisan package:make-admin-controller AdminTestController ACME/TestPackage
```

##### Create a new admin controller with force command

[](#create-a-new-admin-controller-with-force-command)

If controller is already present, then you need to use the force command.

```
php artisan package:make-admin-controller AdminTestController ACME/TestPackage --force
```

#### 3. Create a new admin routes file

[](#3-create-a-new-admin-routes-file)

If you want to create an admin route, then you need to use this command and then register your routes file in the service provider i.e. '**ACME\\TestPackage\\Providers\\TestPackageServiceProvider**'.

```
php artisan package:make-admin-route ACME/TestPackage
```

##### Create a new admin routes file with force command

[](#create-a-new-admin-routes-file-with-force-command)

If admin routes file already present and you want to override this, then you need to use force command.

```
php artisan package:make-admin-route ACME/TestPackage --force
```

#### 4. Create a new shop controller

[](#4-create-a-new-shop-controller)

This command will generate a new controller for your shop portion i.e. '**packages/ACME/TestPackage/src/Http/Controllers/Shop**'.

```
php artisan package:make-shop-controller ShopTestController ACME/TestPackage
```

##### Create a new shop controller with force command

[](#create-a-new-shop-controller-with-force-command)

If controller is already present, then you need to use the force command.

```
php artisan package:make-shop-controller ShopTestController ACME/TestPackage --force
```

#### 5. Create a new shop routes file

[](#5-create-a-new-shop-routes-file)

If you want to create a shop route, then you need to use this command and then register your routes file in the service provider i.e. 'ACME\\TestPackage\\Providers\\TestPackageServiceProvider'.

```
php artisan package:make-shop-route ACME/TestPackage
```

##### Create a new shop routes file with force command

[](#create-a-new-shop-routes-file-with-force-command)

If shop routes file already present and you want to override this, then you need to use force command.

```
php artisan package:make-shop-route ACME/TestPackage --force
```

#### 6. Create a new model class

[](#6-create-a-new-model-class)

This command will create a following files,

- New model class in '**packages/ACME/TestPackage/src/Models**' directory.
- New model proxy class in '**packages/ACME/TestPackage/src/Models**' directory.
- New model contract in '**packages/ACME/TestPackage/src/Contracts**' directory.

```
php artisan package:make-model TestModel ACME/TestPackage
```

##### Create a new model with force command

[](#create-a-new-model-with-force-command)

This command will overwrite all three files.

```
php artisan package:make-model TestModel ACME/TestPackage --force
```

#### 7. Create a new model proxy class

[](#7-create-a-new-model-proxy-class)

This command will create a new model proxy class in '**packages/ACME/TestPackage/src/Models**' directory.

```
php artisan package:make-model-proxy TestModelProxy ACME/TestPackage
```

##### Create a new model proxy with force command

[](#create-a-new-model-proxy-with-force-command)

If model proxy class already present then you can use force command for overwriting.

```
php artisan package:make-model-proxy TestModelProxy ACME/TestPackage --force
```

#### 8. Create a new model contract

[](#8-create-a-new-model-contract)

This command will create a new model contract in '**packages/ACME/TestPackage/src/Contracts**' directory.

```
php artisan package:make-model-contract TestContract ACME/TestPackage
```

##### Create a new model contract with force command

[](#create-a-new-model-contract-with-force-command)

If model contract already present then you can use force command for overwriting.

```
php artisan package:make-model-contract TestDataGrid ACME/TestPackage --force
```

#### 9. Create a new migration class

[](#9-create-a-new-migration-class)

This command will create a new migration class in '**packages/ACME/TestPackage/src/Database/Migrations**' directory.

```
php artisan package:make-migration TestMigration ACME/TestPackage
```

#### 10. Create a new seeder class

[](#10-create-a-new-seeder-class)

This command will create a new seeder class in '**packages/ACME/TestPackage/src/Database/Seeders**' directory.

```
php artisan package:make-seeder TestSeeder ACME/TestPackage
```

##### Create a new seeder class with force command

[](#create-a-new-seeder-class-with-force-command)

If seeder class already present then you can use force command for overwriting.

```
php artisan package:make-seeder TestSeeder ACME/TestPackage --force
```

#### 11. Create a new request class

[](#11-create-a-new-request-class)

This command will create a new request class in '**packages/ACME/TestPackage/src/Http/Requests**' directory.

```
php artisan package:make-request TestRequest ACME/TestPackage
```

##### Create a new request class with force command

[](#create-a-new-request-class-with-force-command)

If request class already present then you can use force command for overwriting.

```
php artisan package:make-request TestRequest ACME/TestPackage --force
```

#### 12. Create a new middleware class

[](#12-create-a-new-middleware-class)

This command will create a new middleware class in '**packages/ACME/TestPackage/src/Http/Middleware**' directory.

```
php artisan package:make-middleware TestMiddleware ACME/TestPackage
```

##### Create a new middleware class with force command

[](#create-a-new-middleware-class-with-force-command)

If middleware class already present then you can use force command for overwriting.

```
php artisan package:make-middleware TestMiddleware ACME/TestPackage --force
```

#### 13. Create a new datagrid class

[](#13-create-a-new-datagrid-class)

This command will create a new data grid class in '**packages/ACME/TestPackage/src/Datagrids**' directory.

```
php artisan package:make-datagrid TestDataGrid ACME/TestPackage
```

##### Create a new datagrid class with force command

[](#create-a-new-datagrid-class-with-force-command)

If data grid class already present then you can use force command for overwriting.

```
php artisan package:make-datagrid TestDataGrid ACME/TestPackage --force
```

#### 14. Create a new repository class

[](#14-create-a-new-repository-class)

This command will create a new repository class in '**packages/ACME/TestPackage/src/Repositories**' directory.

```
php artisan package:make-repository TestRepository ACME/TestPackage
```

##### Create a new repository with force command

[](#create-a-new-repository-with-force-command)

If repository class already present then you can use force command for overwriting.

```
php artisan package:make-repository TestRepository ACME/TestPackage --force
```

#### 15. Create a new service provider class

[](#15-create-a-new-service-provider-class)

This command will create a new service provider class in '**packages/ACME/TestPackage/src/Providers**' directory.

```
php artisan package:make-provider TestServiceProvider ACME/TestPackage
```

##### Create a new service provider with force command

[](#create-a-new-service-provider-with-force-command)

If service provider class already present then you can use force command for overwriting.

```
php artisan package:make-provider TestServiceProvider ACME/TestPackage --force
```

#### 16. Create a new event class

[](#16-create-a-new-event-class)

This command will create a new event class in '**packages/ACME/TestPackage/src/Events**' directory.

```
php artisan package:make-event TestEvent ACME/TestPackage
```

##### Create a new event with force command

[](#create-a-new-event-with-force-command)

If event class already present then you can use force command for overwriting.

```
php artisan package:make-event TestEvent ACME/TestPackage --force
```

#### 17. Create a new listener class

[](#17-create-a-new-listener-class)

This command will create a new listener class in '**packages/ACME/TestPackage/src/Listeners**' directory.

```
php artisan package:make-listener TestListener ACME/TestPackage
```

##### Create a new listener class with force command

[](#create-a-new-listener-class-with-force-command)

If listener class already present then you can use force command for overwriting.

```
php artisan package:make-listener TestListener ACME/TestPackage --force
```

#### 18. Create a new notification class

[](#18-create-a-new-notification-class)

This command will create a new notification class in '**packages/ACME/TestPackage/src/Notifications**' directory.

```
php artisan package:make-notification TestNotification ACME/TestPackage
```

##### Create a new notification with force command

[](#create-a-new-notification-with-force-command)

If notification class already present then you can use force command for overwriting.

```
php artisan package:make-notification TestNotification ACME/TestPackage --force
```

#### 19. Create a new mail class

[](#19-create-a-new-mail-class)

This command will create a new mail class in '**packages/ACME/TestPackage/src/Mail**' directory.

```
php artisan package:make-mail TestMail ACME/TestPackage
```

##### Create a new mail class with force command

[](#create-a-new-mail-class-with-force-command)

If mail class already present then you can use force command for overwriting.

```
php artisan package:make-mail TestMail ACME/TestPackage --force
```

#### 20. Create a new command class

[](#20-create-a-new-command-class)

This command will create a new command class in the '**packages/ACME/TestPackage/src/Console/Commands**' directory.

```
php artisan package:make-command TestCommand ACME/TestPackage
```

##### Create a new command class with force command

[](#create-a-new-command-class-with-force-command)

If command class already present then you can use force command for overwriting.

```
php artisan package:make-command TestCommand ACME/TestPackage --force
```

#### 21. Create a new payment class

[](#21-create-a-new-payment-class)

This command will create a new payment class in '**packages/ACME/TestPackage/src/Payment**' directory.

```
php artisan package:make-payment TestPayment ACME/TestPackage
```

##### Create a new payment with force command

[](#create-a-new-payment-with-force-command)

If payment class already present then you can use force command for overwriting.

```
php artisan package:make-payment TestPayment ACME/TestPackage --force
```

#### 22. Create a new shipping class

[](#22-create-a-new-shipping-class)

This command will create a new shipping class in '**packages/ACME/TestPackage/src/Carriers**' directory.

```
php artisan package:make-shipping TestShipping ACME/TestPackage
```

##### Create a new shipping class with force command

[](#create-a-new-shipping-class-with-force-command)

If shipping class already present then you can use force command for overwriting.

```
php artisan package:make-shipping TestShipping ACME/TestPackage --force
```

#### 23. Create a new module service provider class

[](#23-create-a-new-module-service-provider-class)

This command will create a new module service provider class in '**packages/ACME/TestPackage/src/Providers**' directory.

```
php artisan package:make-module-provider TestServiceProvider ACME/TestPackage
```

##### Create a new module service provider with force command

[](#create-a-new-module-service-provider-with-force-command)

If module service provider class already present then you can use force command for overwriting.

```
php artisan package:make-module-provider TestServiceProvider ACME/TestPackage --force
```

#### 24. Create a new vite config file.

[](#24-create-a-new-vite-config-file)

This command will create a new vite config file in '**packages/ACME/TestPackage**' directory.

```
php artisan package:make-vite-config vite.config ACME/TestPackage
```

##### This command will create a new vite config file with force command

[](#this-command-will-create-a-new-vite-config-file-with-force-command)

If vite config file already present then you can use force command for overwriting.

```
php artisan package:make-vite-config vite.config ACME/TestPackage --force
```

#### 25. Create a new tailwind config file.

[](#25-create-a-new-tailwind-config-file)

This command will create a new tailwind config file in '**packages/ACME/TestPackage**' directory.

```
php artisan package:make-tailwind-config tailwind.config ACME/TestPackage
```

##### This command will create a new tailwind config file with force command

[](#this-command-will-create-a-new-tailwind-config-file-with-force-command)

If tailwind config file already present then you can use force command for overwriting.

```
php artisan package:make-tailwind-config tailwind.config ACME/TestPackage --force
```

#### 26. Create a new post css config file.

[](#26-create-a-new-post-css-config-file)

This command will create a new post css config file in '**packages/ACME/TestPackage**' directory.

```
php artisan package:make-postcss-config postcss.config ACME/TestPackage
```

##### This command will create a new postcss config file with force command

[](#this-command-will-create-a-new-postcss-config-file-with-force-command)

If postcss config file already present then you can use force command for overwriting.

```
php artisan package:make-postcss-config tailwind.config ACME/TestPackage --force
```

#### 27. Create a new payment method package

[](#27-create-a-new-payment-method-package)

This command will create a whole new payment package for you in '**packages/ACME/Stripe**' directory.

```
php artisan package:make-payment-method ACME/Stripe
```

##### Create a new payment method with force command

[](#create-a-new-payment-method-with-force-command)

This command will overwrite whole directory structure.

```
php artisan package:make-payment-method ACME/Stripe --force
```

#### 28. Create a new payment method service provider class

[](#28-create-a-new-payment-method-service-provider-class)

This command will create a new payment method service provider class in '**packages/ACME/Stripe/src/Providers**' directory.

```
php artisan package:make-payment-method-provider TestPaymentMethodServiceProvider ACME/Stripe
```

##### Create a new payment method service provider class with force command

[](#create-a-new-payment-method-service-provider-class-with-force-command)

If payment method service provider class already present then you can use force command for overwriting.

```
php artisan package:make-payment-method-provider TestPaymentMethodServiceProvider ACME/Stripe --force
```

#### 29. Create a new shipping method package

[](#29-create-a-new-shipping-method-package)

This command will create a whole new shipment package in '**packages/ACME/FedEx**' directory.

```
php artisan package:make-shipping-method ACME/FedEx
```

##### Create a new shipping method with force command

[](#create-a-new-shipping-method-with-force-command)

This command will override whole directory structure.

```
php artisan package:make-shipping-method ACME/FedEx --force
```

#### 30. Create a new shipping method service provider class

[](#30-create-a-new-shipping-method-service-provider-class)

This command will create a new shipping method service provider class '**packages/ACME/FedEx/src/Providers**' directory.

```
php artisan package:make-shipping-method-provider TestShippingMethodServiceProvider ACME/FedEx
```

##### Create a new shipping method service provider with force command

[](#create-a-new-shipping-method-service-provider-with-force-command)

If shipping method service provider class already present then you can use force command for overwriting.

```
php artisan package:make-shipping-method-provider TestShippingMethodServiceProvider ACME/FedEx --force
```

#### 31. Create a new theme for shop

[](#31-create-a-new-theme-for-shop)

This command will create a new theme array inside '**config/themes.php**' file under **shop** key.

```
php artisan package:make-shop-theme test ACME/Theme --force
```

#### 32. Create a new theme for admin

[](#32-create-a-new-theme-for-admin)

This command will create a new theme array inside '**config/themes.php**' file under **admin** key.

```
php artisan package:make-admin-theme test ACME/Theme --force
```

###  Health Score

48

—

FairBetter than 93% of packages

Maintenance54

Moderate activity, may be stable

Popularity47

Moderate usage in the ecosystem

Community21

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~406 days

Total

5

Last Release

304d ago

Major Versions

v1.0.0 → v2.0.02024-02-14

### Community

Maintainers

![](https://www.gravatar.com/avatar/b12adc21e990c055e325a3c07339b3d4d313efd49f98a768c1a86fc7776f2b86?d=identicon)[Jitendra Singh](/maintainers/Jitendra%20Singh)

---

Top Contributors

[![jitendra-webkul](https://avatars.githubusercontent.com/u/39991107?v=4)](https://github.com/jitendra-webkul "jitendra-webkul (24 commits)")[![devansh-webkul](https://avatars.githubusercontent.com/u/68321766?v=4)](https://github.com/devansh-webkul "devansh-webkul (24 commits)")[![amit-webkul](https://avatars.githubusercontent.com/u/121479029?v=4)](https://github.com/amit-webkul "amit-webkul (11 commits)")[![shubh-mehrotra](https://avatars.githubusercontent.com/u/90690524?v=4)](https://github.com/shubh-mehrotra "shubh-mehrotra (4 commits)")[![ghermans](https://avatars.githubusercontent.com/u/1594411?v=4)](https://github.com/ghermans "ghermans (1 commits)")[![wadimsewo](https://avatars.githubusercontent.com/u/33370479?v=4)](https://github.com/wadimsewo "wadimsewo (1 commits)")[![zielu92](https://avatars.githubusercontent.com/u/15376106?v=4)](https://github.com/zielu92 "zielu92 (1 commits)")

### Embed Badge

![Health badge](/badges/bagisto-bagisto-package-generator/health.svg)

```
[![Health](https://phpackages.com/badges/bagisto-bagisto-package-generator/health.svg)](https://phpackages.com/packages/bagisto-bagisto-package-generator)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
