PHPackages                             msme/laravel-bloom - 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. msme/laravel-bloom

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

msme/laravel-bloom
==================

Instant, intelligent development data for Laravel applications

v1.0.1(2mo ago)00MITBladePHP ^8.1

Since Mar 5Pushed 2mo agoCompare

[ Source](https://github.com/mouradsme/laravel-bloom)[ Packagist](https://packagist.org/packages/msme/laravel-bloom)[ RSS](/packages/msme-laravel-bloom/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

🌸 Laravel Bloom
===============

[](#-laravel-bloom)

**Instant, intelligent development data for Laravel applications.**

Laravel Bloom automatically generates rich, realistic, and relational datasets directly from your database schema — and gives you a beautiful visual interface to explore it.

No factories. No manual seeders. No configuration required.

---

✨ Why Laravel Bloom?
--------------------

[](#-why-laravel-bloom)

When building features, testing UI flows, or demoing your application, empty databases slow you down.

Laravel Bloom solves this by automatically:

- 🔍 **Analyzing your Eloquent models and database schema**
- 🗂 **Generating migration files in the correct dependency order**
- 🎲 **Populating tables with realistic, context-aware fake data**
- 🔗 **Resolving foreign keys and relationships automatically**
- 🖼 **Visualizing your entire database schema interactively**

---

🚀 Installation
--------------

[](#-installation)

```
composer require msme/laravel-bloom
```

---

🧩 How It Works
--------------

[](#-how-it-works)

Bloom reads your `app/Models` directory and inspects each model's:

- `$fillable` — to know which columns to generate
- `$types` — your explicit column type declarations (e.g. `'price' => 'decimal'`)
- `$casts` — to infer types for boolean, json, hashed fields
- **Relationship methods** — only methods declared directly on your model (not inherited from `Model`, `Authenticatable`, traits, etc.)

This gives Bloom what it needs to generate migrations, seed data, and draw the schema graph — with zero extra configuration.

### Column type resolution

[](#column-type-resolution)

Bloom resolves each column's type using a **priority chain** — `$types` wins, but everything else is inferred automatically:

```
1. public $types   → explicit developer declaration     (highest priority)
2. $casts          → boolean, array → json, hashed → string
3. field name      → anything ending in _id → foreignId
4. default         → string                             (fallback)

```

This means `$types` is **optional** for most columns. Bloom already handles the common cases:

```
class Post extends Model
{
    protected $fillable = ['user_id', 'title', 'slug', 'content', 'published', 'metadata'];

    protected $casts = [
        'published' => 'boolean',  // ✅ Bloom infers → boolean column
        'metadata'  => 'array',    // ✅ Bloom infers → json column
    ];

    // $types not needed here — everything is covered by casts + naming conventions
}
```

You only need `$types` for columns where the type **cannot be inferred** from the name or cast — most commonly `text`, `decimal`, `float`, `integer`, and `timestamp`:

```
class Product extends Model
{
    protected $fillable = ['name', 'description', 'price', 'stock', 'launched_at'];

    public $types = [
        'description' => 'text',       // would default to string without this
        'price'       => 'decimal',    // would default to string without this
        'stock'       => 'integer',    // would default to string without this
        'launched_at' => 'timestamp',  // would default to string without this
    ];
}
```

#### Supported types

[](#supported-types)

TypeMigration columnNotes`string``->string()`Default fallback`text``->text()`For long-form content`integer``->integer()`Whole numbers`float``->float()`Floating point`decimal``->decimal(10, 2)`For prices and money`boolean``->boolean()`Also inferred from `$casts``json``->json()`Also inferred from `array` cast`timestamp``->timestamp()->nullable()`For date/time columns`foreignId``->foreignId()->constrained()`Auto-detected from `_id` suffix#### Fields Bloom already understands without `$types`

[](#fields-bloom-already-understands-without-types)

ConventionAuto-detected asAny field ending in `_id``foreignId``$casts` entry of `boolean``boolean``$casts` entry of `array``json``$casts` entry of `hashed``string``$casts` entry of `integer``integer`Anything else`string`---

🗺 Commands
----------

[](#-commands)

### Generate Migrations

[](#generate-migrations)

Inspects your models and generates migration files into `database/migrations/bloom/`.

```
php artisan bloom:migrations
```

Bloom automatically:

- Detects foreign key columns (any `_id` field) and generates `->foreignId()->constrained()->cascadeOnDelete()`
- Builds a **dependency graph** from your models and **topologically sorts** migrations so `users` always comes before `posts`, `posts` before `comments`, etc.
- Assigns incrementing timestamps (`000000`, `000001`, `000002`...)

Then run them:

```
php artisan migrate --path=/database/migrations/bloom
```

---

### Populate Database

[](#populate-database)

Fills your tables with smart fake data based on column names and types.

```
# Populate all tables (respects dependency order automatically)
php artisan bloom:populate

# Populate a specific table
php artisan bloom:populate users

# Control the number of records
php artisan bloom:populate posts --count=100

# Truncate before seeding
php artisan bloom:populate comments --count=500 --truncate

# Skip auto-seeding dependency tables
php artisan bloom:populate posts --no-deps
```

#### Smart value generation

[](#smart-value-generation)

Bloom maps column names to realistic fake data before falling back to types.

Bloom auto-seeds dependency tables — if you populate `comments` and `posts` is empty, it seeds `posts` first (and `users` before that). Use `--no-deps` to skip this.

---

🖼 Schema Visualizer
-------------------

[](#-schema-visualizer)

Bloom ships with a built-in interactive schema visualizer accessible at:

```
/bloom/schema-visualizer

```

No setup required — just navigate to the route in your browser.

🤝 Contributing
--------------

[](#-contributing)

Contributions are welcome!

1. Fork the repository
2. Create a feature branch
3. Submit a pull request

Please follow Laravel coding conventions.

---

🧑‍💻 Author
----------

[](#‍-author)

Created by **Mourad Bousserouel**

If you find Laravel Bloom useful, consider giving the repository a ⭐

---

📜 License
---------

[](#-license)

Laravel Bloom is open-source software licensed under the **MIT license**.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance87

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

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

Every ~0 days

Total

2

Last Release

65d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/026f1da77c975eeafe1259a3d8d23642dfa843c0643cce8889648eb3b002f6e1?d=identicon)[mouradsme](/maintainers/mouradsme)

---

Top Contributors

[![mouradsme](https://avatars.githubusercontent.com/u/7895396?v=4)](https://github.com/mouradsme "mouradsme (7 commits)")

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/msme-laravel-bloom/health.svg)

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

###  Alternatives

[mbezhanov/faker-provider-collection

A collection of custom providers for the Faker library

2138.6M24](/packages/mbezhanov-faker-provider-collection)[verbb/formie

The most user-friendly forms plugin for Craft.

101372.9k40](/packages/verbb-formie)[blair2004/nexopos

The Free Modern Point Of Sale System build with Laravel, TailwindCSS and Vue.js.

1.2k2.3k](/packages/blair2004-nexopos)[pelmered/fake-car

Fake-Car is a Faker provider that generates fake car data for you.

1271.2M2](/packages/pelmered-fake-car)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

52664.9k12](/packages/solspace-craft-freeform)[jzonta/faker-restaurant

Food and Beverage names generate using fakerphp/faker

96317.2k](/packages/jzonta-faker-restaurant)

PHPackages © 2026

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