PHPackages                             gnu/scaffy-laravel - 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. gnu/scaffy-laravel

ActiveLibrary

gnu/scaffy-laravel
==================

Laravel adapters for the Scaffy/Core package.

v1.7.1(10mo ago)2301MITPHPPHP &gt;=8.0

Since Jul 2Pushed 5mo agoCompare

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

READMEChangelogDependencies (3)Versions (18)Used By (0)

Scaffy Laravel Adapter
======================

[](#scaffy-laravel-adapter)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b1971263c43cf6641e80a57e1aca1ccacd2c75d24ee91355503fd9bc7259af6a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f676e752f7363616666792d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gnu/scaffy-laravel)[![License](https://camo.githubusercontent.com/29c1b592ab82b6846a49d40e21cc685e0f0ef2357b6eb4cd6c0b5abbcc76c932/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f676e756a657375732f7363616666792d6c61726176656c3f7374796c653d666c61742d737175617265)](https://github.com/gnujesus/scaffy-laravel/blob/main/LICENSE)[![Laravel](https://camo.githubusercontent.com/f979d8f8c701bf7dcb90f8a1270d083783f167cdc1ed1eb8acce551444a34603/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d3130253230253743253230313125323025374325323031322d6f72616e67653f7374796c653d666c61742d737175617265266c6f676f3d6c61726176656c)](https://laravel.com/)[![Downloads](https://camo.githubusercontent.com/95d5a3e32fb8870fd6cfa78fb60dd57f681d803ee86bfcc9ff75c315e9a36bbd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f676e752f7363616666792d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gnu/scaffy-laravel)

**Scaffy Laravel** is a Laravel-specific adapter for the [Scaffy Core](https://github.com/gnujesus/scaffy-core) code generation system. It provides an Artisan command to generate Eloquent models directly from your database schema.

---

✨ Features
----------

[](#-features)

- 🎯 Generate models from **SQL Server**, **PostgreSQL**, or **MySQL**
- 🔌 Fully decoupled via **Hexagonal Architecture**
- 🔍 Analyzes your database structure using Laravel's DB layer
- ⚙️ Pluggable support for custom adapters and databases
- 🛠️ Uses Laravel's Artisan Console Command

---

🚀 Installation
--------------

[](#-installation)

```
composer require gnu/scaffy-laravel
```

Scaffy Laravel will be auto-discovered by Laravel.

---

📦 Requirements
--------------

[](#-requirements)

- PHP 8.1+
- Laravel 10, 11, or 12
- One of:
    - SQL Server (`sqlsrv`)
    - PostgreSQL (`pgsql`)
    - MySQL (`mysql`)

---

🧰 Usage
-------

[](#-usage)

```
php artisan scaffy:generate --schema=your_schema
```

### Options

[](#options)

OptionDescription`--schema`The database schema to use`--table`Only generate a model for a specific table`--output`(Coming soon) Output path for generated models (default: `app/Models`)`--with-relations`(Coming soon) Generate relationships between models---

⚙️ Configuration &amp; Binding
------------------------------

[](#️-configuration--binding)

Scaffy binds a default database adapter based on your `DB_CONNECTION`.

To override or extend:

```
use Gnu\Scaffy\Laravel\Ports\DatabasePort;

use App\Adapters\CustomPostgresAdapter;

$this->app->bind(DatabasePort::class, fn () => new CustomPostgresAdapter());
```

---

🧱 Architecture
--------------

[](#-architecture)

Scaffy follows **Hexagonal Architecture**:

- `scaffy-core`: Business logic &amp; interfaces
- `scaffy-laravel`: Laravel integration (command, container)
- Future: CLI, Symfony, CodeIgniter, standalone PHP

---

🧪 Example Output
----------------

[](#-example-output)

```
namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class User extends Model
{
    protected $fillable = [
        'id',
        'name',
        'email'
    ];

    public $timestamps = false;

    public function getTable()
    {
        return 'dbo.users';
    }

}
```

---

📄 License
---------

[](#-license)

MIT © [gnujesus](https://github.com/gnujesus)

###  Health Score

36

—

LowBetter than 81% of packages

Maintenance67

Regular maintenance activity

Popularity11

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

Total

17

Last Release

302d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/47e51a2f732e78a89edf3d3cfed2683cb4e349328d921437d6fcdb508f7d4046?d=identicon)[gnujesus](/maintainers/gnujesus)

---

Top Contributors

[![gnujesus](https://avatars.githubusercontent.com/u/107089453?v=4)](https://github.com/gnujesus "gnujesus (39 commits)")

### Embed Badge

![Health badge](/badges/gnu-scaffy-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/gnu-scaffy-laravel/health.svg)](https://phpackages.com/packages/gnu-scaffy-laravel)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M682](/packages/barryvdh-laravel-ide-helper)[laravel/jetstream

Tailwind scaffolding for the Laravel framework.

4.1k19.8M136](/packages/laravel-jetstream)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M157](/packages/orchestra-canvas)[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)

PHPackages © 2026

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