PHPackages                             autn/laravel-schema - 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. autn/laravel-schema

ActiveProject[Framework](/categories/framework)

autn/laravel-schema
===================

The Laravel schema package.

v3.0(5y ago)63.8k8[2 issues](https://github.com/autn/laravel-schema/issues)MITPHPPHP &gt;=5.5.9CI failing

Since May 11Pushed 5y ago1 watchersCompare

[ Source](https://github.com/autn/laravel-schema)[ Packagist](https://packagist.org/packages/autn/laravel-schema)[ RSS](/packages/autn-laravel-schema/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (9)Dependencies (6)Versions (14)Used By (0)

Laravel Database Schema
=======================

[](#laravel-database-schema)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ba51db93949f105cc681ffe370c06ad029c4845263d757594a6749060005e9a0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6175746e2f6c61726176656c2d736368656d612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/autn/laravel-schema)[![Build Status](https://camo.githubusercontent.com/5af83b3825532f582ae2a92f7708c977ae00ab6d8383cb5122c228b4fd72d90b/68747470733a2f2f6170692e7472617669732d63692e6f72672f6175746e2f6c61726176656c2d736368656d612e7376673f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://travis-ci.org/autn/laravel-schema)[![Total Downloads](https://camo.githubusercontent.com/00d8be59a32e0cdb296297f836e10a0b91e67c8033f7fb8933644f031052da3f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6175746e2f6c61726176656c2d736368656d612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/autn/laravel-schema)

1. About
--------

[](#1-about)

This package generate Mysql database schema from migrations files.

Update Sep 2020: Now support latest Laravel version

2. Installation
---------------

[](#2-installation)

Install via composer - edit your `composer.json` to require the package.

```
"require": {
    // ...
    "autn/laravel-schema": "*"
}
```

Then run `composer update` in your terminal to pull it in. Once this has finished, you will need to add the command to the `commands` array in your `app/Console/Kernel.php` config as follows:

```
// ....
protected $commands = [
    // ...
    'db:schema' => \Autn\Schema\Console\Commands\DumpSql::class,
];
// ...
```

3. Usage
--------

[](#3-usage)

**Notice:** The command will refresh your database, the seeding and actual datas will remove. I recommend use `--dbconnect` to run with other database.

In root Laravel project, type:

```
php artisan db:schema
```

The file will generate to the default `databases` path (`database/schema.sql`).

You can change this path by add `--path` option to the command.

Example:

```
php artisan db:schema --path=public
```

The default database connect is `mysql` in `config/database.php`. You can change the connect by add `--dbconnect` to the command.

Example:

```
php artisan db:schema --path=public --dbconnect=mysql2
```

**Notice:** If you add `--dbconnect` option, you must add config to `config/database.php`.

Example:

```
// ....
'mysql' => [
    'driver' => 'mysql',
    'host' => env('DB_HOST', 'localhost'),
    'port' => env('DB_PORT', '3306'),
    'database' => env('DB_DATABASE', 'db'),
    'username' => env('DB_USERNAME', 'root'),
    'password' => env('DB_PASSWORD', 'root'),
    'charset' => 'utf8',
    'collation' => 'utf8_unicode_ci',
    'prefix' => '',
    'strict' => false,
    'engine' => null,
],

'mysql2' => [
    'driver' => 'mysql',
    'host' => 'localhost',
    'port' => '3306',
    'database' => 'db2',
    'username' => 'root',
    'password' => 'root',
    'charset' => 'utf8',
    'collation' => 'utf8_unicode_ci',
    'prefix' => '',
    'strict' => false,
    'engine' => null,
],
// ...
```

There are full options:

```
--path=: Path to save schema file

--dbconnect=: Database connect to run

--force: Run without confirmation

--method=: Name of method (mysqldump/php). If your server not install mysql (remote to other database server), you must select `php` method

--refresh=: Public migration files and refresh migrations (yes/no)

--type=: Type of file (sql/gzip/bzip2)

```

4. Changelog
------------

[](#4-changelog)

- Version 1.x

```
Supported mysqldump method

```

- Version 2.0.x

```
Supported php method (mysqldump version php)

```

- Version 2.1.x

```
Supported compress (type option)

```

- Version 3.x

```
Update to support latest Laravel version

```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 96.1% 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 ~144 days

Recently: every ~386 days

Total

12

Last Release

2064d ago

Major Versions

v1.3 → v2.02016-06-21

v2.1.1 → v3.02020-09-16

### Community

Maintainers

![](https://www.gravatar.com/avatar/ecc861b654aba45460dff58d7590c9221dc010bc2622b3ce38aaf17952f7652f?d=identicon)[autn](/maintainers/autn)

---

Top Contributors

[![autn](https://avatars.githubusercontent.com/u/10827140?v=4)](https://github.com/autn "autn (73 commits)")[![toancong](https://avatars.githubusercontent.com/u/5398771?v=4)](https://github.com/toancong "toancong (3 commits)")

---

Tags

frameworklaravelschemadatabase

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/autn-laravel-schema/health.svg)

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

###  Alternatives

[orchid/platform

Platform for back-office applications, admin panel or CMS your Laravel app.

4.8k2.5M59](/packages/orchid-platform)[kompo/kompo

Laravel &amp; Vue.js FullStack Components for Rapid Application Development

11812.4k21](/packages/kompo-kompo)

PHPackages © 2026

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