PHPackages                             minvws/laravel-sql-exporter - 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. minvws/laravel-sql-exporter

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

minvws/laravel-sql-exporter
===========================

Laravel SQL Exporter

v1.1.3(11mo ago)0475EUPL-1.2PHPPHP &gt;=8.1CI passing

Since Jan 8Pushed 5mo ago12 watchersCompare

[ Source](https://github.com/minvws/nl-rdo-laravel-sql-export)[ Packagist](https://packagist.org/packages/minvws/laravel-sql-exporter)[ RSS](/packages/minvws-laravel-sql-exporter/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (8)Versions (6)Used By (0)

Laravel SQL exporter
====================

[](#laravel-sql-exporter)

This package is a slim package that allows you to export your Laravel database migrations to an SQL file.

Requirements
------------

[](#requirements)

Before using the package, make sure you have the following requirements:

- PHP 8.1 or higher
- Laravel 10 or higher
- Composer

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

[](#installation)

Install the package via composer (as a **dev dependency**):

```
composer require --dev minvws/laravel-sql-exporter
```

Usage
-----

[](#usage)

After installing the package, you can run the following command to export your migrations to an SQL file:

```
vendor/bin/sail artisan sql-export migration_description
```

By default, the laravel migrations are read from the `database/migrations` folder of the working directory. By default, the SQL file will be saved in the `database/sql` folder of the working directory.

You can specify the laravel migrations and the output location by adding the `laravelMigrationsPath` or the `sqlMigrationsPath` arguments:

```
 vendor/bin/sail artisan sql-export migration_description \
 --laravelMigrationsPath=/path/to/laravel/migrations \
 --sqlMigrationsPath=/path/to/sql/migrations
```

Development
-----------

[](#development)

To contribute to the development of this package, you can clone the repository and run the following command to install the dependencies:

```
composer install
```

A running PostgreSQL database is required to run the tests. To create the database run the following command:

```
docker run --name laravel-sql-export-test-postgres -v "$(pwd)/tests/fixtures/init.sql:/docker-entrypoint-initdb.d/10-create-testing-database.sql" -e POSTGRES_PASSWORD=password -p 55322:5432 -d postgres || docker start laravel-sql-export-test-postgres ||  echo "Unable to start Postgres container, it may already be running"
```

To run the tests, you can use the following command:

```
vendor/bin/phpunit
```

To stop and remove the PostgreSQL container after running the tests, you can use:

```
docker stop laravel-sql-export-test-postgres
docker rm laravel-sql-export-test-postgres
```

Contributing
------------

[](#contributing)

If you encounter any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request on the GitHub repository of this package.

License
-------

[](#license)

This package is open-source and released under the European Union Public License version 1.2. You are free to use, modify, and distribute the package in accordance with the terms of the license.

Part of iCore
-------------

[](#part-of-icore)

This package is part of the iCore project.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance62

Regular maintenance activity

Popularity16

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~128 days

Total

5

Last Release

347d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/35585f12d5551026d3cf7e8e25170cd718a16a5017096b3201ed196311ac51d9?d=identicon)[annejan](/maintainers/annejan)

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

![](https://www.gravatar.com/avatar/44e7cc7a950c1f964d8c8a5e3421d5fa61d6592add09ee3936ed267d75b2be33?d=identicon)[rdobeheer](/maintainers/rdobeheer)

---

Top Contributors

[![gerbrand-bosch](https://avatars.githubusercontent.com/u/12494166?v=4)](https://github.com/gerbrand-bosch "gerbrand-bosch (35 commits)")[![ricklambrechts](https://avatars.githubusercontent.com/u/1367665?v=4)](https://github.com/ricklambrechts "ricklambrechts (16 commits)")[![annejan](https://avatars.githubusercontent.com/u/294470?v=4)](https://github.com/annejan "annejan (13 commits)")[![sigio](https://avatars.githubusercontent.com/u/781641?v=4)](https://github.com/sigio "sigio (5 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![randh1r](https://avatars.githubusercontent.com/u/17409257?v=4)](https://github.com/randh1r "randh1r (3 commits)")[![lkeijmel](https://avatars.githubusercontent.com/u/532438?v=4)](https://github.com/lkeijmel "lkeijmel (3 commits)")[![reinschaap](https://avatars.githubusercontent.com/u/84009181?v=4)](https://github.com/reinschaap "reinschaap (1 commits)")

---

Tags

icorelaravelexportsql

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/minvws-laravel-sql-exporter/health.svg)

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

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11120.2M21](/packages/anourvalar-eloquent-serialize)[mnabialek/laravel-sql-logger

Log SQL queries in Laravel/Lumen framework

158796.3k2](/packages/mnabialek-laravel-sql-logger)[supliu/laravel-query-monitor

Laravel Query Monitor

287111.9k](/packages/supliu-laravel-query-monitor)[ramadan/easy-model

A Laravel package for enjoyably managing database queries.

101.6k](/packages/ramadan-easy-model)

PHPackages © 2026

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