PHPackages                             triquang/laravel-solid-maker - 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. triquang/laravel-solid-maker

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

triquang/laravel-solid-maker
============================

Generate SOLID-based scaffolding (Service, Repository, Tests...) for Laravel — supports both standard and modular architectures.

2.1.1(9mo ago)013MITPHPPHP ^8.0

Since Jul 27Pushed 9mo agoCompare

[ Source](https://github.com/ntquangkk/laravel-solid-maker)[ Packagist](https://packagist.org/packages/triquang/laravel-solid-maker)[ RSS](/packages/triquang-laravel-solid-maker/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (5)Used By (0)

Laravel Solid Maker
===================

[](#laravel-solid-maker)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1320c75e17a751e5ced322d63fb59f2c1ba2e5cfba6740b114c1c3882906a49a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7472697175616e672f6c61726176656c2d736f6c69642d6d616b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/triquang/laravel-solid-maker)[![Total Downloads](https://camo.githubusercontent.com/911824cc338eed5861f8e301ee8f54921cd481678d35f019c6bc7e9d77ff3ba6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7472697175616e672f6c61726176656c2d736f6c69642d6d616b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/triquang/laravel-solid-maker)[![License](https://camo.githubusercontent.com/d983b8bd16469ad39d58ec00558c5e03ea88a422bea4d9fd955f0cd15f9ca48f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7472697175616e672f6c61726176656c2d736f6c69642d6d616b65722e7376673f7374796c653d666c61742d737175617265)](https://github.com/ntquangkk/laravel-solid-maker?tab=MIT-1-ov-file)

**Laravel Solid Maker** is a developer-friendly package for Laravel that allows you to quickly scaffold SOLID-structured boilerplate code across key architectural layers.

It supports both **standard Laravel** and **modular Laravel** architectures (e.g., using `nwidart/laravel-modules`).

---

✨ What It Generates
-------------------

[](#-what-it-generates)

### Database Layer

[](#database-layer)

- Model
- Migration
- Factory
- Seeder

### Flow Layer

[](#flow-layer)

- Controller
- Form Request (Store, Update)
- Resource
- Policy

### Business Logic Layer

[](#business-logic-layer)

- Service
- Repository
- Repository Interface

### Testing Layer

[](#testing-layer)

- Unit Test
- Feature Test

### Binding

[](#binding)

- **Interface bindings**

    - `*RepositoryServiceProvider`
        - **Standard Laravel**: Register in `bootstrap/providers.php` (first-time only, if needed).
        - **Modular Laravel**: Register in `module.json` (first-time only, if needed).
- **Auto-registrations**

    - `*DatabaseSeeder`
    - `*routes/api.php`
    - `*Policy`
    - `*PHPUnit` test suites

---

📦 Installation
--------------

[](#-installation)

This package is intended for development only.
Please install it using the `--dev` flag:

Install via Composer:

```
composer require triquang/laravel-solid-maker --dev
```

The service provider will be automatically registered.

(Optional) Publish the stubs if you want to customize the file templates:

```
php artisan vendor:publish --tag=solid-stubs
```

This will publish stub files to:

```
stubs/vendor/triquang/laravel-solid-maker
```

---

🚀 Usage
-------

[](#-usage)

Generate a full set of SOLID-style files with:

```
php artisan make:solid-scaffold --model=YourModelName [--module=YourModuleName] [--view]
```

### Options

[](#options)

OptionRequiredDescription`--model`✅ YesName of the Eloquent model (e.g., `Post`)`--module`❌ NoModule name (for modular Laravel projects)`--view`❌ NoGenerate `web.php` routes instead of `api.php`### Example

[](#example)

```
php artisan make:solid-scaffold --model=Post --module=Blog
```

This will generate and register:

- **Database Layer**: Model, Migration, Factory, Seeder
- **Request Layer**: Store &amp; Update Form Requests
- **Presentation Layer**: Controller, Resource, Policy
- **Business Logic**: Service, Repository, Interface
- **Testing**: Unit Test, Feature Test
- **Bindings &amp; Registrations**:
    - `RepositoryServiceProvider`
    - `BlogDatabaseSeeder`
    - `module.json`
    - `routes/api.php`

#### 📁 Folder Structure

[](#-folder-structure)

Create `Post` SOLID scaffold in `Modules\Blog`

```
Project
├── phpunit.xml                                             // register if exists
└── Modules
    └── Blog
        ├── app
        │   ├── Http
        │   │   ├── Controllers
        │   │   │   └── PostController.php
        │   │   ├── Requests
        │   │   │   ├── StorePostRequest.php
        │   │   │   └── UpdatePostRequest.php
        │   │   └── Resources
        │   │       └── PostResource.php
        │   ├── Models
        │   │   └── Post.php
        │   ├── Policies
        │   │   └── PostPolicy.php
        │   ├── Providers
        │   │   ├── BlogServiceProvider.php                // register or create
        │   │   └── RepositoryServiceProvider.php          // register or create
        │   ├── Repositories
        │   │   ├── Contracts
        │   │   │   └── PostRepositoryInterface.php
        │   │   └── PostRepository.php
        │   └── Services
        │       └── PostService.php
        ├── database
        │   ├── factories
        │   │   └── PostFactory.php
        │   ├── migrations
        │   │   └── YYYY_mm_dd_His_create_posts_table.php
        │   └── seeders
        │       ├── BlogDatabaseSeeder.php                  // register or create
        │       └── PostSeeder.php
        ├── module.json                                     // register or create
        ├── routes
        │   └── api.php                                     // register or create
        └── tests
            ├── Feature
            │   └── PostTest.php
            └── Unit
                └── PostServiceTest.php
```

---

🛠 Customizing the Stubs
-----------------------

[](#-customizing-the-stubs)

Once published, you can edit stub templates at:

```
stubs/vendor/triquang/laravel-solid-maker
```

Your future generated files will reflect those customizations.

---

🧭 Auto-Generated Code Markers
-----------------------------

[](#-auto-generated-code-markers)

This package adds **clear flags** in generated code to help developers easily find and review them.

### Example

[](#example-1)

```
// AUTO-GEN: Placeholder
public function getAll()
{
    return $this->repository->getAll();
}
```

### Available Markers

[](#available-markers)

- `// AUTO-GEN-4-SOLID`
- `// AUTO-GEN: Placeholder`
- `AUTO-GEN: Placeholder - Incomplete test.`

You can quickly search these markers (`Ctrl/Cmd+Shift+F`) to locate auto-generated code and **remove them after review**.

---

✅ Requirements
--------------

[](#-requirements)

- PHP &gt;= 8.0
- Laravel 11 / 12
- Composer

---

📄 License
---------

[](#-license)

MIT © [Nguyễn Trí Quang](mailto:ntquangkk@gmail.com)

---

🙌 Contributing
--------------

[](#-contributing)

PRs are welcome! Feel free to improve functionality or report issues via GitHub Issues.

---

📬 Contact
---------

[](#-contact)

- GitHub: [github.com/ntquangkk](https://github.com/ntquangkk)
- Email:

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance58

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity44

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

Total

4

Last Release

271d ago

Major Versions

v1.0.0 → 2.0.02025-07-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/e380eb3996158d1c0bc9d35cad8b1b3872337fa1b3027649bece5887b0edaafc?d=identicon)[triquang](/maintainers/triquang)

---

Top Contributors

[![ntquangkk](https://avatars.githubusercontent.com/u/45850915?v=4)](https://github.com/ntquangkk "ntquangkk (14 commits)")

---

Tags

laravelgeneratorscaffoldinterfaceservicemodulerepositorydddmodularsolid

### Embed Badge

![Health badge](/badges/triquang-laravel-solid-maker/health.svg)

```
[![Health](https://phpackages.com/badges/triquang-laravel-solid-maker/health.svg)](https://phpackages.com/packages/triquang-laravel-solid-maker)
```

PHPackages © 2026

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