PHPackages                             royalcms/laravel-sql-generator - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. royalcms/laravel-sql-generator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

royalcms/laravel-sql-generator
==============================

convert Laravel migrations to raw SQL scripts

v2.1.2(5y ago)015MITPHP

Since Jun 26Pushed 5y agoCompare

[ Source](https://github.com/royalcms/laravel-sql-generator)[ Packagist](https://packagist.org/packages/royalcms/laravel-sql-generator)[ RSS](/packages/royalcms-laravel-sql-generator/feed)WikiDiscussions master Synced 3w ago

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

![Packagist License](https://camo.githubusercontent.com/cecbcdf550301ed9e8975a01e85ab6e5c4475ba20458d405d21c7be7f5ab8272/68747470733a2f2f706f7365722e707567782e6f72672f726f79616c636d732f6c61726176656c2d73716c2d67656e657261746f722f6c6963656e73652e706e67)[![Total Downloads](https://camo.githubusercontent.com/1f2afc6d9fec3ba8fd20d1966c82d8ee5c74705599066bf70ba4a43b8323f26a/68747470733a2f2f706f7365722e707567782e6f72672f726f79616c636d732f6c61726176656c2d73716c2d67656e657261746f722f642f746f74616c2e706e67)](https://packagist.org/packages/royalcms/laravel-sql-generator)

LARAVEL SQL GENERATOR
=====================

[](#laravel-sql-generator)

Convert Laravel migrations to raw SQL scripts

Usage
-----

[](#usage)

### Step 1: Install Through Composer

[](#step-1-install-through-composer)

```
composer require "royalcms/laravel-sql-generator:^2.0"

```

### Step 2: Add the Service Provider

[](#step-2-add-the-service-provider)

Now add the following to the providers array in your config/app.php

```
\Royalcms\Laravel\SqlGenerator\SqlGeneratorServiceProvider::class,
```

### Step 3: Now publish the vendor

[](#step-3-now-publish-the-vendor)

```
php artisan vendor:publish
```

### Step 4: Run command

[](#step-4-run-command)

Then you will need to run these commands in the terminal

```
php artisan sql:generate
```

This Will Generate "database.sql" in 'database/sql' directory If you want change path directory go to 'config/sql\_generator.php' change value 'defaultDirectory'

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 80% 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 ~231 days

Total

5

Last Release

2003d ago

Major Versions

v1.0.0 → v2.0.02021-01-07

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1106638?v=4)[Hao.Dongfang](/maintainers/royalwang)[@royalwang](https://github.com/royalwang)

---

Top Contributors

[![jackinos](https://avatars.githubusercontent.com/u/17823071?v=4)](https://github.com/jackinos "jackinos (16 commits)")[![ajayfroiden](https://avatars.githubusercontent.com/u/6275382?v=4)](https://github.com/ajayfroiden "ajayfroiden (3 commits)")[![little-apps](https://avatars.githubusercontent.com/u/1192535?v=4)](https://github.com/little-apps "little-apps (1 commits)")

### Embed Badge

![Health badge](/badges/royalcms-laravel-sql-generator/health.svg)

```
[![Health](https://phpackages.com/badges/royalcms-laravel-sql-generator/health.svg)](https://phpackages.com/packages/royalcms-laravel-sql-generator)
```

###  Alternatives

[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17878.9k](/packages/markwalet-nova-modal-response)[crumbls/layup

A visual page builder plugin for Filament 5 — Divi-style grid layouts with extensible widgets.

592.6k2](/packages/crumbls-layup)[team-nifty-gmbh/tall-datatables

Server-side rendered datatables for Laravel and Livewire

1320.9k4](/packages/team-nifty-gmbh-tall-datatables)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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