PHPackages                             laravel-toolkit/laravel-db-seeder-export - 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. laravel-toolkit/laravel-db-seeder-export

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

laravel-toolkit/laravel-db-seeder-export
========================================

Export Laravel database tables to seeders with Telegram and email backup functionality

v1.0.0(1y ago)0445MITPHPPHP ^7.4|^8.0

Since Apr 26Pushed 1y agoCompare

[ Source](https://github.com/LaravelTools/laravel-db-seeder-export)[ Packagist](https://packagist.org/packages/laravel-toolkit/laravel-db-seeder-export)[ RSS](/packages/laravel-toolkit-laravel-db-seeder-export/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Laravel DB Seeder Export
========================

[](#laravel-db-seeder-export)

A Laravel package to export database tables into Laravel Seeder classes with support for Telegram notifications and email alerts.

Features
--------

[](#features)

- Export database tables to Laravel Seeder classes
- Automatic dependency detection between tables
- Support for multiple database types (MySQL, PostgreSQL, SQLite, SQL Server)
- Schema-aware seeders that can adapt to column changes
- Telegram notifications with file attachments
- Email notifications with detailed statistics
- Advanced filtering options to include/exclude tables
- JSON output for API integrations
- Comprehensive stats and reporting

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

[](#installation)

You can install the package via composer:

```
composer require laravel-toolkit/laravel-db-seeder-export
```

Publishing Configuration
------------------------

[](#publishing-configuration)

```
php artisan vendor:publish --tag=db-seeder-export-config
```

This will publish the configuration file to `config/db-seeder-export.php`.

To publish the email templates:

```
php artisan vendor:publish --tag=db-seeder-export-views
```

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

Export all tables:

```
php artisan db:export-seeder --all
```

Export specific tables:

```
php artisan db:export-seeder users posts comments
```

### Options

[](#options)

OptionDescription`--all`Export all tables in the database`--disable-foreign-keys`Temporarily disable foreign key constraints during seeding`--exclude=table1,table2`Tables to exclude from export`--exclude-pattern=pattern1,pattern2`Exclude tables matching these patterns (e.g., "telescope\_*,log\_*")`--include-migrations`Include the migrations table which is excluded by default`--schema-aware`Create schema-aware seeders that can adapt to column changes`--telegram`Send the backup to Telegram`--delete-after-send`Delete the backup files after sending to Telegram`--output-json`Format output as JSON (useful for API calls)`--notify-email=email1,email2`Send email notification to these addresses`--skip-empty-tables`Skip tables that have no data`--storage-disk=diskname`Specify storage disk to save backup (default: local)`--max-execution-time=seconds`Set maximum execution time in seconds### Configuration

[](#configuration)

You can configure the package by editing the `config/db-seeder-export.php` file or by setting environment variables in your `.env` file:

```
# General Settings
DB_SEEDER_SCHEMA_AWARE=true
DB_SEEDER_DISABLE_FK=true
DB_SEEDER_SKIP_EMPTY=false
DB_SEEDER_MAX_EXECUTION_TIME=300
DB_SEEDER_STORAGE_DISK=local

# Telegram Configuration
DB_SEEDER_TELEGRAM_ENABLED=true
DB_SEEDER_TELEGRAM_BOT_TOKEN=your_telegram_bot_token
DB_SEEDER_TELEGRAM_CHAT_ID=your_telegram_chat_id

# Email Configuration
DB_SEEDER_MAIL_ENABLED=true
DB_SEEDER_MAIL_TO=admin@example.com,alerts@example.com
```

### Using Created Seeders

[](#using-created-seeders)

After running the export command, the seeders will be created in a timestamped directory inside the `database/seeders` folder. The command will output instructions for using the seeders.

To run the master seeder (which will run all individual seeders in the correct order):

```
php artisan db:seed --class="Database\Seeders\BackupXXXXXXXXXXXXX\DatabaseBackupSeeder"
```

Telegram Integration
--------------------

[](#telegram-integration)

To use the Telegram integration, you need to:

1. Create a Telegram bot using [BotFather](https://t.me/botfather)
2. Get your chat ID (you can use the [userinfobot](https://t.me/userinfobot))
3. Set the environment variables:
    - `DB_SEEDER_TELEGRAM_ENABLED=true`
    - `DB_SEEDER_TELEGRAM_BOT_TOKEN=your_token`
    - `DB_SEEDER_TELEGRAM_CHAT_ID=your_chat_id`

Email Notifications
-------------------

[](#email-notifications)

To send email notifications after backup completion:

1. Ensure your Laravel mail configuration is set up correctly
2. Set the recipient email addresses in the config file or using the `--notify-email` option

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance44

Moderate activity, may be stable

Popularity16

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

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

Unknown

Total

1

Last Release

434d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7d98fc19761b05ac6f9179dde707a745006dde10f8f8b58c49722e05e2cb3294?d=identicon)[Ali Maghari](/maintainers/Ali%20Maghari)

---

Top Contributors

[![Ali-Maghari](https://avatars.githubusercontent.com/u/90560844?v=4)](https://github.com/Ali-Maghari "Ali-Maghari (1 commits)")

---

Tags

laraveldatabasebackupexportseeder

### Embed Badge

![Health badge](/badges/laravel-toolkit-laravel-db-seeder-export/health.svg)

```
[![Health](https://phpackages.com/badges/laravel-toolkit-laravel-db-seeder-export/health.svg)](https://phpackages.com/packages/laravel-toolkit-laravel-db-seeder-export)
```

###  Alternatives

[spatie/laravel-medialibrary

Associate files with Eloquent models

6.1k43.2M632](/packages/spatie-laravel-medialibrary)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M166](/packages/spatie-laravel-health)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M198](/packages/laravel-ai)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)[itpathsolutions/dbstan

Database Standardization and Analysis Tool for Laravel

492.9k](/packages/itpathsolutions-dbstan)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5022.0k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

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