PHPackages                             misakstvanu/laravel-subdirectory-migrations - 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. misakstvanu/laravel-subdirectory-migrations

ActiveLibrary

misakstvanu/laravel-subdirectory-migrations
===========================================

Automatically include all subdirectories in Laravel migration discovery

v1.0.0(yesterday)00MITPHPPHP ^8.0

Since Jul 23Pushed yesterdayCompare

[ Source](https://github.com/misakstvanu/laravel-subdirectory-migrations)[ Packagist](https://packagist.org/packages/misakstvanu/laravel-subdirectory-migrations)[ RSS](/packages/misakstvanu-laravel-subdirectory-migrations/feed)WikiDiscussions master Synced today

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

laravel-subdirectory-migrations
===============================

[](#laravel-subdirectory-migrations)

A super simple Laravel package that changes the migration discovery logic to automatically include all subdirectories under every registered migration path.

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

[](#installation)

```
composer require misakstvanu/laravel-subdirectory-migrations
```

The package auto-discovers itself via Laravel's package discovery, so no manual provider registration is needed.

Usage
-----

[](#usage)

Organise your migrations into subdirectories however you like — the package will find them all automatically:

```
database/
└── migrations/
    ├── 2024_01_01_000000_create_users_table.php
    ├── orders/
    │   ├── 2024_02_01_000000_create_orders_table.php
    │   └── 2024_02_02_000000_create_order_items_table.php
    └── payments/
        └── 2024_03_01_000000_create_payments_table.php

```

Run migrations as normal:

```
php artisan migrate
```

All migration commands (`migrate`, `migrate:rollback`, `migrate:status`, `migrate:fresh`, etc.) will automatically pick up migrations in subdirectories.

How it works
------------

[](#how-it-works)

During the `boot` phase, `SubdirectoryMigrationsServiceProvider` recursively walks `database/migrations` with `RecursiveDirectoryIterator` and calls `loadMigrationsFrom()` for every subdirectory found. Laravel's built-in migration commands then discover all those paths automatically. No configuration required.

License
-------

[](#license)

MIT

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 60% 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

1d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6bc48954dcd166e31a15e1a5da3e253b5ae1b4ba0031e391de4ccfdecef04c91?d=identicon)[misakstvanu](/maintainers/misakstvanu)

---

Top Contributors

[![misakstvanu](https://avatars.githubusercontent.com/u/42741294?v=4)](https://github.com/misakstvanu "misakstvanu (3 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (2 commits)")

---

Tags

laravelmigrationssubdirectory

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/misakstvanu-laravel-subdirectory-migrations/health.svg)

```
[![Health](https://phpackages.com/badges/misakstvanu-laravel-subdirectory-migrations/health.svg)](https://phpackages.com/packages/misakstvanu-laravel-subdirectory-migrations)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M245](/packages/laravel-ai)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8793.2M25](/packages/yajra-laravel-oci8)[glushkovds/phpclickhouse-laravel

Adapter of the most popular library https://github.com/smi2/phpClickHouse to Laravel

2051.5M2](/packages/glushkovds-phpclickhouse-laravel)[api-platform/laravel

API Platform support for Laravel

58174.6k17](/packages/api-platform-laravel)

PHPackages © 2026

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