PHPackages                             pkeidel/dbtolaravel - 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. pkeidel/dbtolaravel

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

pkeidel/dbtolaravel
===================

Reads a database and creates the migrations, models, controllers and blades for the tables

v2.0.5(1y ago)04751MITBladePHP ^8.1

Since Sep 7Pushed 1y ago1 watchersCompare

[ Source](https://github.com/PKeidel/dbtolaravel)[ Packagist](https://packagist.org/packages/pkeidel/dbtolaravel)[ RSS](/packages/pkeidel-dbtolaravel/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (2)Versions (35)Used By (0)

README
======

[](#readme)

[![](https://camo.githubusercontent.com/d95f39129b85834f55705be27f48b28a4881f1a89e6680b560b9725e51e39736/687474703a2f2f666f7274686562616467652e636f6d2f696d616765732f6261646765732f6d616b65732d70656f706c652d736d696c652e737667)](https://camo.githubusercontent.com/d95f39129b85834f55705be27f48b28a4881f1a89e6680b560b9725e51e39736/687474703a2f2f666f7274686562616467652e636f6d2f696d616765732f6261646765732f6d616b65732d70656f706c652d736d696c652e737667)

[![Build Status](https://camo.githubusercontent.com/8b9324f1dafb830fed666803664bb82d3c11de719732769a77141cd2dc27b5f0/68747470733a2f2f7472617669732d63692e6f72672f504b656964656c2f6462746f6c61726176656c2e737667)](https://travis-ci.org/PKeidel/dbtolaravel)With this package it is possible to auto-generate a lot of needed files if you already have an existing database schema. Files that can be generated:

- migration
- model
- views to view a single model, edit a single model and list all models
- controller
- route
- seeder with existing data

Install
-------

[](#install)

```
composer require pkeidel/dbtolaravel
```

DB2Laravel is only active if `APP_DEBUG=true` or `DBTOLARAVEL_ENABLED=true`

### usage

[](#usage)

- visit yoururl/dbtolaravel, for example
- you can select a configured database connection
- in the table you can create all files of view a diff to compare the file to an existing one

### Filter Tables

[](#filter-tables)

Register a filter in your `AppServiceProvider.php`:

```
DBtoLaravelHelper::$FILTER = function($table) {
    return strpos($table, 'eyewitness_io_') !== 0 && strpos($table, 'oauth_') !== 0;
};
```

### Override type mapping

[](#override-type-mapping)

```
DBtoLaravelHelper::$MAPPINGS = ['enum' => 'string', 'bytea' => 'binary', 'macaddr' => 'string'];
```

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity83

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 84.3% 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 ~81 days

Recently: every ~69 days

Total

32

Last Release

660d ago

Major Versions

v0.1.10 → v1.0.02018-05-22

v1.3.0 → v2.0.02023-10-12

PHP version history (4 changes)v0.1.0PHP &gt;=5.4.0

v0.1.2PHP &gt;=5.6.0

v1.0.5PHP &gt;=7.0

v2.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/748433d40403823c295ae1e046e5b5f87f1557f49619acbeffc7260a0db62cd7?d=identicon)[PKeidel](/maintainers/PKeidel)

---

Top Contributors

[![PKeidel](https://avatars.githubusercontent.com/u/6698883?v=4)](https://github.com/PKeidel "PKeidel (43 commits)")[![lolfser](https://avatars.githubusercontent.com/u/117940277?v=4)](https://github.com/lolfser "lolfser (7 commits)")[![fossabot](https://avatars.githubusercontent.com/u/29791463?v=4)](https://github.com/fossabot "fossabot (1 commits)")

---

Tags

hacktoberfestlaravel5laravel6dbtolaraveldb2laravel

### Embed Badge

![Health badge](/badges/pkeidel-dbtolaravel/health.svg)

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

###  Alternatives

[overtrue/laravel-versionable

Make Laravel model versionable.

585308.0k5](/packages/overtrue-laravel-versionable)[onecentlin/laravel-adminer

Laravel Adminer Database Manager

260491.1k3](/packages/onecentlin-laravel-adminer)[rutorika/sortable

Adds sortable behavior and ordering to Laravel Eloquent models. Grouping and many to many supported.

299992.5k14](/packages/rutorika-sortable)[rtconner/laravel-likeable

Trait for Laravel Eloquent models to allow easy implementation of a 'like' or 'favorite' or 'remember' feature.

394388.0k5](/packages/rtconner-laravel-likeable)[nayjest/grids

Grids for Laravel 4 &amp; Laravel 5 frameworks

200152.0k1](/packages/nayjest-grids)[delatbabel/elocryptfive

Automatically encrypt and decrypt Eloquent attributes with ease.

8493.0k](/packages/delatbabel-elocryptfive)

PHPackages © 2026

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