PHPackages                             michelmelo/laravel-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. michelmelo/laravel-package-generator

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

michelmelo/laravel-package-generator
====================================

Laravel Package Generator

0.0.1(2y ago)03MITPHP

Since Nov 27Pushed 2y ago1 watchersCompare

[ Source](https://github.com/michelmelo/laravel-package-generator)[ Packagist](https://packagist.org/packages/michelmelo/laravel-package-generator)[ RSS](/packages/michelmelo-laravel-package-generator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Laravel Package Generator
=========================

[](#laravel-package-generator)

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

[](#1-introduction)

Laravel 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)

- **Laravel**: v9.X.X or higher.

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

[](#3-installation)

### Install with composer

[](#install-with-composer)

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

```
composer require michelmelo/laravel-package-generator
```

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.mmpackage:make[Create a new package.](#1-create-a-new-package)package-name--force, --plain02.mmpackage:make-controller[Create a new controller.](#2-create-a-new-controller)controller-name, package-name--force03.mmpackage:make-route[Create a new routes file.](#3-create-a-new-routes-file)package-name--force04.mmpackage:make-model[Create a new model class.](#4-create-a-new-model-class)model-name, package-name--force05.mmpackage:make-model-proxy[Create a new model proxy class.](#5-create-a-new-model-proxy-class)model-proxy-name, package-name--force06.mmpackage:make-model-contract[Create a new model contract.](#6-create-a-new-model-contract)model-contract-name, package-name--force07.mmpackage:make-migration[Create a new migration class.](#7-create-a-new-migration-class)migration-name, package-name08.mmpackage:make-seeder[Create a new seeder class.](#08-create-a-new-seeder-class)seeder-name, package-name--force09.mmpackage:make-request[Create a new request class.](#09-create-a-new-request-class)request-name, package-name--force10.mmpackage:make-middleware[Create a new middleware class.](#10-create-a-new-middleware-class)middleware-name, package-name--force11.mmpackage:make-datagrid[Create a new datagrid class.](#11-create-a-new-datagrid-class)datagrid-name, package-name--force12.mmpackage:make-repository[Create a new repository class.](#12-create-a-new-repository-class)repository-name, package-name--force13.mmpackage:make-provider[Create a new service provider class.](#13-create-a-new-service-provider-class)provider-name, package-name--force14.mmpackage:make-event[Create a new event class.](#14-create-a-new-event-class)event-name, package-name--force15.mmpackage:make-listener[Create a new listener class.](#15-create-a-new-listener-class)listener-name, package-name--force16.mmpackage:make-notification[Create a new notification class.](#16-create-a-new-notification-class)notification-name, package-name--force17.mmpackage:make-mail[Create a new mail class.](#17-create-a-new-mail-class)mail-name, package-name--force18.mmpackage:make-command[Create a new command class.](#18-create-a-new-command-class)command-name, package-name--force19.mmpackage:make-module-provider[Create a new module service provider class.](#19-create-a-new-module-service-provider-class)provider-name, package-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)

#### 01. Create a new package

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

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

```
php artisan mmpackage: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 mmpackage: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 mmpackage: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 mmpackage:make ACME/TestPackage --force
```

#### 02. Create a new controller

[](#02-create-a-new-controller)

This command will generate a new controller for your portion.

```
php artisan mmpackage:make-controller TestController ACME/TestPackage
```

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

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

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

```
php artisan mmpackage:make-controller TestController ACME/TestPackage --force
```

#### 03. Create a new routes file

[](#03-create-a-new-routes-file)

If you want to create an 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 mmpackage:make-route ACME/TestPackage
```

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

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

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

```
php artisan mmpackage:make-route ACME/TestPackage --force
```

#### 04. Create a new model class

[](#04-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 mmpackage: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 mmpackage:make-model TestModel ACME/TestPackage --force
```

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

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

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

```
php artisan mmpackage: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 mmpackage:make-model-proxy TestModelProxy ACME/TestPackage --force
```

#### 06. Create a new model contract

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

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

```
php artisan mmpackage: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 mmpackage:make-model-contract TestDataGrid ACME/TestPackage --force
```

#### 07. Create a new migration class

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

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

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

#### 08. Create a new seeder class

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

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

```
php artisan mmpackage: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 mmpackage:make-seeder TestSeeder ACME/TestPackage --force
```

#### 09. Create a new request class

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

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

```
php artisan mmpackage: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 mmpackage:make-request TestRequest ACME/TestPackage --force
```

#### 10. Create a new middleware class

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

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

```
php artisan mmpackage: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 mmpackage:make-middleware TestMiddleware ACME/TestPackage --force
```

#### 11. Create a new datagrid class

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

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

```
php artisan mmpackage: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 mmpackage:make-datagrid TestDataGrid ACME/TestPackage --force
```

#### 12. Create a new repository class

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

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

```
php artisan mmpackage: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 mmpackage:make-repository TestRepository ACME/TestPackage --force
```

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

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

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

```
php artisan mmpackage: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 mmpackage:make-provider TestServiceProvider ACME/TestPackage --force
```

#### 14. Create a new event class

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

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

```
php artisan mmpackage: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 mmpackage:make-event TestEvent ACME/TestPackage --force
```

#### 15. Create a new listener class

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

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

```
php artisan mmpackage: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 mmpackage:make-listener TestListener ACME/TestPackage --force
```

#### 16. Create a new notification class

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

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

```
php artisan mmpackage: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 mmpackage:make-notification TestNotification ACME/TestPackage --force
```

#### 17. Create a new mail class

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

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

```
php artisan mmpackage: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 mmpackage:make-mail TestMail ACME/TestPackage --force
```

#### 18. Create a new command class

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

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

```
php artisan mmpackage: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 mmpackage:make-command TestCommand ACME/TestPackage --force
```

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

[](#19-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 mmpackage: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 mmpackage:make-module-provider TestServiceProvider ACME/TestPackage --force
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Unknown

Total

1

Last Release

903d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0d756073dec37ac9abd3c7edd0cf00b94f2d2de0055531eba5472392b1fd4da2?d=identicon)[michelmelo](/maintainers/michelmelo)

---

Top Contributors

[![michelmelo](https://avatars.githubusercontent.com/u/159223?v=4)](https://github.com/michelmelo "michelmelo (1 commits)")

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

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

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

###  Alternatives

[dorsetdigital/silverstripe-enhanced-requirements

Enhanced requirements for Silverstripe

117.8k4](/packages/dorsetdigital-silverstripe-enhanced-requirements)[infoweb-internet-solutions/yii2-cms-analytics

Analytics module for Yii2

112.4k1](/packages/infoweb-internet-solutions-yii2-cms-analytics)

PHPackages © 2026

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