PHPackages                             acadea/boilerplate - 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. [Framework](/categories/framework)
4. /
5. acadea/boilerplate

ActiveLibrary[Framework](/categories/framework)

acadea/boilerplate
==================

An opinionated Laravel boilerplate generator. Generate boilerplates like repositories, routes, events, api docs and much more!

v0.2.0(5y ago)07[6 issues](https://github.com/acadea/laravel-boilerplate-generator/issues)MITPHPPHP ^7.4CI failing

Since May 30Pushed 5y ago1 watchersCompare

[ Source](https://github.com/acadea/laravel-boilerplate-generator)[ Packagist](https://packagist.org/packages/acadea/boilerplate)[ Docs](https://github.com/acadea/laravel-boilerplate-generator)[ Fund](https://acadea.io/open-source/support-us)[ GitHub Sponsors](https://github.com/acadea)[ RSS](/packages/acadea-boilerplate/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (5)Versions (8)Used By (0)

Laravel Boilerplate Generator
=============================

[](#laravel-boilerplate-generator)

[![Latest Version on Packagist](https://camo.githubusercontent.com/0680664511284f9d4b34a4cda6e19a666c156b17bbea4ac5321d596d46944482/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6163616465612f6c61726176656c2d626f696c6572706c6174652d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/acadea/laravel-boilerplate-generator)[![GitHub Tests Action Status](https://camo.githubusercontent.com/77833f85263e24b43627c38bbc3ba67de84a9d58fe1ea08fe8fbea01436b7fb1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6163616465612f6c61726176656c2d626f696c6572706c6174652d67656e657261746f722f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/acadea/laravel-boilerplate-generator/actions?query=workflow%3Arun-tests+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/d1b95fdcfb7aed377206d865734cea398f34f8d5c1571c13b7e992f293d6dfa7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6163616465612f6c61726176656c2d626f696c6572706c6174652d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/acadea/laravel-boilerplate-generator)

An opinionated boilerplate generator. Generate boilerplates like repositories, routes, events, api docs and much more!

NOTE
----

[](#note)

This project is still under development and unusable.

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

[](#installation)

You can install the package via composer:

```
composer require acadea/boilerplate
```

You can publish and run the migrations with:

```
php artisan vendor:publish --provider="Acadea\Boilerplate\BoilerplateServiceProvider" --tag="migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --provider="Acadea\Boilerplate\BoilerplateServiceProvider" --tag="config"
```

This is the contents of the published config file:

```
return [
];
```

Usage
-----

[](#usage)

First, define a `schema.php` file in the `database` folder. You can overwrite the default file path in the `boilerplate.php` config file.

### Structure of `schema.php`

[](#structure-of-schemaphp)

Must follow convention Pivot: post\_tag

Model name must be singular and snake-cased

```
return [
    'post' => [
        'title' => [
            // any column type supported by eloquent
            // https://laravel.com/docs/8.x/migrations#available-column-types
            'type' => 'string',
            // attributes are column modifier
            // https://laravel.com/docs/8.x/migrations#column-modifiers
            'attributes' => [
                // put a flat string if no argument to pass to the modifier
                'nullable',
                // if we need to pass arguments to the modifier
                // array key is the modifier method, value should be an array of arguments value to pass to the modifier
                'default' => ['some post'],
            ],
        ],
        'body' => [
            'type' => 'mediumText',
            'attributes' => ['nullable'],
        ],
        'book_author_id' => [
            'type' => 'foreignId',
            'foreign' => [
                'references' => 'id',
                'on' => 'book_authors',
            ],
        ],
        // will add belongsToMany relationship to model
        'tags' => [
            'type' => 'pivot',
            'pivot' => [
                'table' => 'post_tag',
                'related_key' => 'post_id',
                'foreign_key' => 'tag_id',

            ]
        ]

    ],

    // PIVOT TABLE
    // add 'pivot:' before table name to create pivot migration
    'pivot:post_tag' => [
        'post_id' => [
            // to set this column as primary key in the pivot table
            'primary' => true,
            'type' => 'foreignId',
            'attributes' => [
                'index'
            ],
            'foreign' => [
                'references' => 'id',
                'on' => 'posts',
            ],
        ],
        'tag_id' => [
            'primary' => true,
            'type' => 'foreignId',
            'attributes' => [
                'index'
            ],
            'foreign' => [
                'references' => 'id',
                'on' => 'tags',
            ],
        ],

    ],
];
```

### API routes

[](#api-routes)

This package will bootstrap all the boilerplate routes for you.

However, you will need to include the following code in `api.php` for the boilerplate to work correctly.

```
Route::group([
    'namespace' => 'Api',
    'as' => 'api.',
    'middleware' => [
        'auth:sanctum',
    ],
], function () {
    require __DIR__ . '/api/v1.php';
});
```

Alternatively, you can run the `boilerplate:install` command, this package will overwrite the `api.php` file for you.

Caveats
-------

[](#caveats)

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Sam Ngu](https://github.com/sam-ngu)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

Total

2

Last Release

1845d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/01746d3f70ae25319ff6a993a3f6f620d0e700e4531892af056cd298ca502d58?d=identicon)[Acadea](/maintainers/Acadea)

---

Top Contributors

[![sam-ngu](https://avatars.githubusercontent.com/u/30950704?v=4)](https://github.com/sam-ngu "sam-ngu (90 commits)")

---

Tags

acadealaravel-boilerplate-generator

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/acadea-boilerplate/health.svg)

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

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M191](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M256](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M592](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)

PHPackages © 2026

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