PHPackages                             jdion84/lucid - 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. [Database &amp; ORM](/categories/database)
4. /
5. jdion84/lucid

ActiveLibrary[Database &amp; ORM](/categories/database)

jdion84/lucid
=============

Declare database schemas inside Laravel models.

1.0.0(2y ago)061MITPHP

Since Feb 16Pushed 2y ago1 watchersCompare

[ Source](https://github.com/jdion84/lucid)[ Packagist](https://packagist.org/packages/jdion84/lucid)[ RSS](/packages/jdion84-lucid/feed)WikiDiscussions main Synced 2d ago

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

Lucid
=====

[](#lucid)

Declare database schemas inside Laravel models.

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

[](#installation)

Require this package via composer:

```
composer require jdion84/lucid
```

Usage
-----

[](#usage)

Create a new model class with a schema method:

```
php artisan make:schema Post
```

Or, add a schema method to an existing model:

```
namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Jdion84\Lucid\Table;

class Post extends Model
{
    use HasFactory;

    public function schema(Table $table)
    {
        $table->id();
        $table->string('title')->index();
        $table->text('body');
        $table->timestamp('created_at');
        $table->timestamp('updated_at');
    }
}
```

Migrate &amp; sync model schema methods with the database:

```
php artisan migrate:schemas
```

Commands
--------

[](#commands)

Create a new model class with a schema method:

```
php artisan make:schema {name} {--p|pivot} {--force}
```

Migrate &amp; sync model schema methods with the database:

```
migrate:schemas {--f|fresh} {--s|seed} {--force}
```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity42

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

Unknown

Total

1

Last Release

870d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/819eef7ad23fc20ccf8c8c367448e8cb3c0f38899908783604a774ffcb5d9fc0?d=identicon)[jdion84](/maintainers/jdion84)

---

Top Contributors

[![jdion84](https://avatars.githubusercontent.com/u/128343211?v=4)](https://github.com/jdion84 "jdion84 (1 commits)")

---

Tags

databaselaravellucidmodelsschemaslaraveldatabasemodelslucidschemas

### Embed Badge

![Health badge](/badges/jdion84-lucid/health.svg)

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

###  Alternatives

[laravel-doctrine/migrations

Doctrine Migrations for Laravel

792.9M17](/packages/laravel-doctrine-migrations)[gearbox-solutions/eloquent-filemaker

A package for getting FileMaker records as Eloquent models in Laravel

6662.6k2](/packages/gearbox-solutions-eloquent-filemaker)[giacomomasseron/laravel-models-generator

Generate Laravel models from an existing database

557.6k](/packages/giacomomasseron-laravel-models-generator)

PHPackages © 2026

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