PHPackages                             holdmyglass/zapcraft - 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. holdmyglass/zapcraft

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

holdmyglass/zapcraft
====================

A Laravel package to generate necessary files for any Entity

v1.0.1(2y ago)1422MITPHPPHP ^8.1

Since Dec 19Pushed 2y ago1 watchersCompare

[ Source](https://github.com/holdmyglass/zapcraft)[ Packagist](https://packagist.org/packages/holdmyglass/zapcraft)[ Docs](https://github.com/holdmyglass/zapcraft)[ RSS](/packages/holdmyglass-zapcraft/feed)WikiDiscussions main Synced 1mo ago

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

ZapCraft Laravel Package
========================

[](#zapcraft-laravel-package)

After spending a considerable amount of time in development, I noticed a recurring pattern—I was performing the same tasks repeatedly. Every time I created a new model, I found myself generating similar files with identical content. In an effort to simplify this repetitive process and streamline my workflow, I decided to create the ZapCraft Laravel package.

ZapCraft is designed with my favorite coding structure in mind, offering a solution to automate the creation of essential files and components for new models. Built on top of the trusted `nwidart/laravel-modules` package, ZapCraft introduces functionalities to effortlessly generate models, migrations, controllers, repositories, interfaces, DTOs, services, requests, resources, and routes for any entity in your Laravel project.

Installation
------------

[](#installation)

To install ZapCraft, use the following Composer command:

```
composer require holdmyglass/zapcraft
```

Getting Started
---------------

[](#getting-started)

ZapCraft simplifies the process of creating and organizing components in your Laravel application. This package is dependent on `nwidart/laravel-modules` package. If you have already installed this package then it's fine. If you have not installed it, then the zapcraft package will automatically install the laravel-modules package.

Autoloading
-----------

[](#autoloading)

By default, module classes aren't loaded automatically. To autoload them using psr-4, add the following line to the end of the root composer.json file under the autoload section:

```
  "autoload": {
    "psr-4": {
      "App\\": "app/",
      "Database\\Factories\\": "database/factories/",
      "Database\\Seeders\\": "database/seeders/",
      "Modules\\": "Modules/"
    }
  }

```

Now run `composer dump-autoload` in the root of your laravel app.

Commands
--------

[](#commands)

- `sail php artisan zapcraft:all Product --module=Sale`
- `sail php artisan zapcraft:model Product --module=Sale -m`
- `sail php artisan zapcraft:migration Product --module=Sale`
- `sail php artisan zapcraft:controller Product --module=Sale`
- `sail php artisan zapcraft:repository Product --module=Sale`
- `sail php artisan zapcraft:interface Product --module=Sale`
- `sail php artisan zapcraft:service Product --module=Sale`
- `sail php artisan zapcraft:resource Product --module=Sale`
- `sail php artisan zapcraft:collection Product --module=Sale`
- `sail php artisan zapcraft:dto Product --module=Sale`
- `sail php artisan zapcraft:route Product --module=Sale`

The first command will generate all the necessary files and classes. For the rest, it should be clear what it can generate looking at the command name.

After we generate everything, we need to bind the interfaces with repository. So lets say we generate everything with the following command:

`sail php artisan zapcraft:all Product --module=Sale`

This is create all the files for Product entity inside Sale module. This will create ReadProductRepositoryInterface, WriteProductRepositoryInterface and ProductRepository along with many other files. We need to bind these two interfaces with repository. Open `Modules/Sale/app/Providers/SaleServiceProvider` and paste the following inside `public function register()` function:

- `$this->app->bind(ReadProductRepositoryInterface::class, ProductRepository::class);`
- `$this->app->bind(WriteProductRepositoryInterface::class, ProductRepository::class);`

P.S. Don't forget to import these class at top using use statement.

Customization
-------------

[](#customization)

ZapCraft is designed to be flexible and customizable. You can modify the generated files, tweak configurations, and adapt the code to fit your specific needs.

Features
--------

[](#features)

ZapCraft provides the following features:

- Entity Generation: Quickly generate models, migrations, controllers, repositories, interfaces, DTOs, services, requests, resources, and routes for your entities.
- Modular Structure: Leverage the power of Laravel Modules to keep your application organized and maintainable.
- Consistency: Ensure consistency in your codebase by using ZapCraft to generate standardized components.
- Time-Saving: Save development time by automating repetitive tasks and reducing the boilerplate code you need to write.

Contributing
------------

[](#contributing)

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or create a pull request on the [Github Repository](https://github.com/holdmyglass/zapcraft).

License
-------

[](#license)

ZapCraft is open-sourced software licensed under the [MIT License](https://en.wikipedia.org/wiki/MIT_License) .

Support
-------

[](#support)

If you encounter any issues or have questions, feel free to reach out to us through [Github Issues](https://github.com/holdmyglass/zapcraft/issues).

Happy coding with ZapCraft!

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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 ~0 days

Total

2

Last Release

875d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5ca44f409539fe017ae18dc377d317f917feceb2bb6d560a34ff9eab20ac4f69?d=identicon)[holdmyglass](/maintainers/holdmyglass)

---

Top Contributors

[![mesushanta](https://avatars.githubusercontent.com/u/867168?v=4)](https://github.com/mesushanta "mesushanta (3 commits)")

---

Tags

laravellaravel-packageSushanta Pyakurelzapcraft

### Embed Badge

![Health badge](/badges/holdmyglass-zapcraft/health.svg)

```
[![Health](https://phpackages.com/badges/holdmyglass-zapcraft/health.svg)](https://phpackages.com/packages/holdmyglass-zapcraft)
```

###  Alternatives

[realrashid/sweet-alert

Laravel Sweet Alert Is A Package For Laravel Provides An Easy Way To Display Alert Messages Using The SweetAlert2 Library.

1.2k2.9M21](/packages/realrashid-sweet-alert)[imanghafoori/laravel-nullable

A package to help you write expressive defensive code in a functional manner

151423.7k6](/packages/imanghafoori-laravel-nullable)[djunehor/laravel-bible

Laravel package to fetch from the Holy Bible

182.8k](/packages/djunehor-laravel-bible)[paxha/laravel-reportable

This Laravel Eloquent extension provides record according to dates using models.

111.2k](/packages/paxha-laravel-reportable)

PHPackages © 2026

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