PHPackages                             xmarkclx/laravel-autodb - 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. xmarkclx/laravel-autodb

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

xmarkclx/laravel-autodb
=======================

Automatically creates database for Laravel based on a few PHP documentation comments.

1.0.0(10y ago)014MITPHPPHP &gt;=5.5.9

Since Mar 13Pushed 10y ago1 watchersCompare

[ Source](https://github.com/xmarkclx/laravel-autodb)[ Packagist](https://packagist.org/packages/xmarkclx/laravel-autodb)[ Docs](http://markcl.net)[ RSS](/packages/xmarkclx-laravel-autodb/feed)WikiDiscussions master Synced 4w ago

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

Introduction
============

[](#introduction)

Automatically creates database based on few PHP documentation comments.

- Easy to use
- Stable
- Fully Tested: Major Features are tested for stability
- Framework agnostic
- Pleasurable to work with
- Supports Laravel / Eloquent

Usage
=====

[](#usage)

Install via composer
--------------------

[](#install-via-composer)

```
composer require xmarkclx/laravel-autodb

```

Create Database Comments
------------------------

[](#create-database-comments)

Given we have a comment on a class like so:

```
/**
 * Class Example
 *
 * @db===
 * @property string $avatar_url
 * @property int $id #increments
 * @db===
 **
 * @package App
 */
 class Example implements AutogeneratedDBFields
 {
```

We run:

```
    php artisan autodb

```

What happens:

- Will create table example if not yet created.
- In that table:
    - Creates string called avatar\_url.
    - Creates integer called id that is a primary key and auto-increments.

FAQs
====

[](#faqs)

Why?
----

[](#why)

- Creating database migrations and changing them is time consuming. This will make it faster.
- Also, this would avoid migration conflicts that happens when multiple migrations, try to modify the same database fields.
- Furthermore, with this method, you can automatically get autocomplete suggestions on your IDE for the database fields due to it being related to phpdoc tags.
- No more need to open database viewer to know what fields the model has, just look at the model file.
- Agile Friendly: Make database improvements fast.

Why not just make this tool create migrations?
----------------------------------------------

[](#why-not-just-make-this-tool-create-migrations)

Well, we can, and it's not hard, but I don't have time for that yet.

If you want to help, you just need to make an assembler for that, just see how src/LaravelModelAssembler.php works and you can make a LaravelMigrationAssembler.php or something that assembles migrations instead of the database.

### Example

[](#example)

- I create migration where name is now an integer based on a test.
- Production server gets my migration and migrated it.
- Production server names are now integers.
- So that's why it was decided to auto migrate data instead of creating migration files.

I want to help make this project better.
----------------------------------------

[](#i-want-to-help-make-this-project-better)

See docs/Architecture.md for how it is architected.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

3762d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/07a5996ede979aac681b4fb3f11073250f7810434fec0fd557c8bdbd19dc23a3?d=identicon)[xmarkclx](/maintainers/xmarkclx)

---

Top Contributors

[![xmarkclx](https://avatars.githubusercontent.com/u/5523580?v=4)](https://github.com/xmarkclx "xmarkclx (5 commits)")

---

Tags

databasemodelautomaticmigratecreateautomagic

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/xmarkclx-laravel-autodb/health.svg)

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

###  Alternatives

[lulco/phoenix

Database Migrations for PHP

179346.9k4](/packages/lulco-phoenix)[symlex/doctrine-active-record

Object-oriented CRUD for Doctrine DBAL

308.7k2](/packages/symlex-doctrine-active-record)[lastzero/doctrine-active-record

Object-oriented CRUD for Doctrine DBAL

306.0k](/packages/lastzero-doctrine-active-record)

PHPackages © 2026

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