PHPackages                             ifo/laravel-make-packager - 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. ifo/laravel-make-packager

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

ifo/laravel-make-packager
=========================

1.0.7(1y ago)03.0k↓29.2%MITPHP

Since Apr 26Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Mmaheshbabu123/MakePackager)[ Packagist](https://packagist.org/packages/ifo/laravel-make-packager)[ RSS](/packages/ifo-laravel-make-packager/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)DependenciesVersions (9)Used By (0)

How to Setup MakePackager Package in Your Laravel Project
=========================================================

[](#how-to-setup-makepackager-package--in-your-laravel-project)

This package is a CLI tool that helps you build a fully structured package for a Laravel application without spending a lot of time. You no longer need to struggle with initializing the skeleton for your package. Instead, focus on writing the source code while Laravel Packager organizes the package structure for you.

Step 0: Pre-Installation Setup
------------------------------

[](#step-0-pre-installation-setup)

Before installing, please add the necessary file to your root project. You can find the file and instructions at the following link:

[Custom Route Provider Setup](https://github.com/Mmaheshbabu123/make-packager-custom-route-provider/blob/main/README.md)

Step 1: Install the Package
---------------------------

[](#step-1-install-the-package)

Run the following command to install the package:

```
composer require ifo/laravel-make-packager
```

Step 2: Dump Autoload
---------------------

[](#step-2-dump-autoload)

After installing the package, run the following command to autoload the package:

```
composer dump-autoload
```

The package has been successfully installed.

How to Create a Custom Package
==============================

[](#how-to-create-a-custom-package)

Step 1: Create a New Package
----------------------------

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

Run the following command to create a new package:

```
php artisan package:make YourPackageName
```

This command will create the folder structure and necessary files for your package, including routes, `ServiceProvider`, and an `AbstractController` for enforcing rules and validations.

You can refer to the screenshot below:

[![Package Structure](https://private-user-images.githubusercontent.com/29708637/325941990-f12f0829-9023-4a55-bfaf-4025d59bde64.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzUzNzExNzMsIm5iZiI6MTc3NTM3MDg3MywicGF0aCI6Ii8yOTcwODYzNy8zMjU5NDE5OTAtZjEyZjA4MjktOTAyMy00YTU1LWJmYWYtNDAyNWQ1OWJkZTY0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA0MDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNDA1VDA2MzQzM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWEyMWEyNmFkN2NmNzEyZTA3MzU3NjI1ZjFhMTkxZmZiYjBiYjUzYzM2ZWU4M2E5MjJkNDI2M2JjMWQ1NDRkMzcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.EJioZT4TfjmazRBHgZSSKjhw36Cp0ukSe0_aUFhGgeU)](https://private-user-images.githubusercontent.com/29708637/325941990-f12f0829-9023-4a55-bfaf-4025d59bde64.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzUzNzExNzMsIm5iZiI6MTc3NTM3MDg3MywicGF0aCI6Ii8yOTcwODYzNy8zMjU5NDE5OTAtZjEyZjA4MjktOTAyMy00YTU1LWJmYWYtNDAyNWQ1OWJkZTY0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA0MDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNDA1VDA2MzQzM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWEyMWEyNmFkN2NmNzEyZTA3MzU3NjI1ZjFhMTkxZmZiYjBiYjUzYzM2ZWU4M2E5MjJkNDI2M2JjMWQ1NDRkMzcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.EJioZT4TfjmazRBHgZSSKjhw36Cp0ukSe0_aUFhGgeU)

Folder Structure
----------------

[](#folder-structure)

Here’s what the folder structure will look like:

```
--> packageName
    --> composer.json
    --> module.json
    --> src
        --> Config
        --> Console
        --> Database
        --> Events
        --> Http
            --> Controllers
                --> AbstractController // For rules and validations, extends in controllers
                --> PackageNameController
            --> Middleware
            --> Requests
        --> Jobs
        --> Listeners
        --> Models
        --> Providers
            --> ModuleServiceProvider
            --> RouteServiceProvider
        --> Resources
        --> routes
            --> V1.php
            --> web.php
        --> Test
            -->Unit
            -->Feature
```

Step 2: Register the Package
----------------------------

[](#step-2-register-the-package)

To register the package, follow the setup steps below:

### Step 1: Create Package Directory

[](#step-1-create-package-directory)

Create a `packages` folder and move the `MakePackager` directory inside it.

### Step 2: Update Composer Autoload

[](#step-2-update-composer-autoload)

Add the package namespace to the `composer.json` file under the `psr-4` key:

```
"autoload": {
   "psr-4": {
      "Packages\\MakePackager\\": "packages/MakePackager/src"
   }
}
```

### Step 3: Register the Service Provider

[](#step-3-register-the-service-provider)

- For Laravel version below 10: Register the `ServiceProvider` in the `config/app.php` file inside the `providers` array:

```
'providers' => [
    Packages\MakePackager\Providers\MakePackagerServiceProvider::class,
]
```

- For Laravel version 10 and above: Register the `ServiceProvider` in the `app/Providers/AppServiceProvider.php` file in the `register` method:

```
public function register(): void
{
    $this->app->register(CustomPackageServiceProvider::class);
}
```

### Step 4: Initial Setup Completion

[](#step-4-initial-setup-completion)

Run the following commands to complete the setup:

```
composer dump-autoload
php artisan config:cache
php artisan config:clear
```

Adding Middleware
-----------------

[](#adding-middleware)

If you want to automatically apply middleware authentication, add the `CustomRouteServiceProvider`. This will ensure that the middleware is added by default.

If you prefer not to use the custom middleware setup, you can remove the extension of `CustomRouteServiceProvider` and instead extend `ServiceProvider` directly.

MakePackager Artisan Commands
=============================

[](#makepackager-artisan-commands)

Here are a few custom artisan commands to create specific packages:

```
php artisan package:make-job YourFileName YourPackageName
```

to create jobs for a specific package

```
php artisan package:make-migration YourFileName YourPackageName
```

to create migration files for a specific package

```
php artisan package:make-listener YourFileName YourPackageName
```

to create listeners for a specific package

```
php artisan package:make-event YourFileName YourPackageName
```

to create events for a specific package

```
sudo php artisan package:make-test SamleTest Myo --feature
```

This command creates a test file in a specific package.

- First Argument (`FileName`): The name of the test file you want to create.
- Second Argument (`PackageName`): The name of the package where the test file will be placed.
- Third Argument (`--feature`): An optional flag. If provided, the test file will be created under the `Feature` folder. If omitted, the test file will be created under the `Unit` folder by default.

This package has an additional feature: it will automatically register the test and unit scripts in the root project’s `phpunit.xml` file, allowing them to be executed smoothly.

More artisan commands will be added in future updates.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 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

Every ~27 days

Recently: every ~20 days

Total

8

Last Release

561d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/70e8282b5cfee3a7880ab5ea0f4ebf9756aac31865f66c897731ff2b75993f78?d=identicon)[Mmaheshbabu123](/maintainers/Mmaheshbabu123)

---

Top Contributors

[![Mmaheshbabu123](https://avatars.githubusercontent.com/u/29708637?v=4)](https://github.com/Mmaheshbabu123 "Mmaheshbabu123 (44 commits)")

### Embed Badge

![Health badge](/badges/ifo-laravel-make-packager/health.svg)

```
[![Health](https://phpackages.com/badges/ifo-laravel-make-packager/health.svg)](https://phpackages.com/packages/ifo-laravel-make-packager)
```

PHPackages © 2026

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