PHPackages                             ed-fruty/laravel4-namespace-migrator - 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. ed-fruty/laravel4-namespace-migrator

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

ed-fruty/laravel4-namespace-migrator
====================================

Package for Laravel 4, supporting using namespaces in migration classes

v1.0.0(11y ago)226MITPHP

Since Dec 2Pushed 11y ago1 watchersCompare

[ Source](https://github.com/ed-fruty/laravel4-namespace-migrator)[ Packagist](https://packagist.org/packages/ed-fruty/laravel4-namespace-migrator)[ RSS](/packages/ed-fruty-laravel4-namespace-migrator/feed)WikiDiscussions master Synced 1mo ago

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

laravel4-namespace-migrator
===========================

[](#laravel4-namespace-migrator)

Laravel 4 is not support namespaces in migration classes, but it is not a problem ;)

\#Installation

1. Use Composer to install package into your project:

```
composer require "ed-fruty/laravel4-namespace-migrator": "1.0.0"
```

2. Add the service provider in `app/config/app.php`:

```
'Fruty\LaravelNamespaceMigrator\LaravelNamespaceMigratorServiceProvider',
```

3. Publish package configuration

```
php artisan config:publish ed-fruty/laravel4-namespace-migrator
```

\#Usage

Default migration namespaces searching
--------------------------------------

[](#default-migration-namespaces-searching)

 When you call migrations like ```bash php artisan migrate --path=app/Modules/Blog/Migrations ``` Migrator automatically searches classes with namespace `App\\Modules\\Blog\\Migrations` in `app/Modules/Blog/Migrations` To change default values, edit configuration file `app/config/packages/ed-fruty/laravel4-namespace-migrator/main.php` block `default` Reserving namespaces for migration paths
----------------------------------------

[](#reserving-namespaces-for-migration-paths)

For reserving namespace for some path, edit configuration file `app/config/packages/ed-fruty/laravel4-namespace-migrator/main.php`. Example: ```
'reserved' => [
      base_path('app/modules/Blog/migrations') => 'Blog\\Migrations\\',
  ]
```

It means, when you call migrations like:

```
php artisan migrate --path=app/modules/Blog/migrations
```

Migrator automatically searches classes with namespace `Blog\Migrations` in that directory.

Workbenches
-----------

[](#workbenches)

For workbench packages Migrator automatically searches migrations by `vendor/package` name. When you call migrations like: ```
php artisan migrate --bench=foo/bar
```

Migrator searches classes with namespace `Foo\Bar\Migrations` in `workbench/foo/bar/src/migrations`So if workbench namespace does not equal to `vendor/package` name you must register it in 'reserved' block like:

```
base_path('workbench/foo/bar/src/migrations') => 'VendorNamespace\\PackageNamespace\\'
```

Without namespaces
------------------

[](#without-namespaces)

Migrator always searches classes with namespace firstly and if class not found with namespace it trying to search class without namespace. For example basic usage: ```
php artisan migrate

```

By default configs, Migrator firstly searches migration classes with namespace `App\database\migrations` in `app/database/migrations` and if it does not exists, Migrator tries to load class without namespace from that catalog.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

4179d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cc1c797c9a43c2996df14bfb8205455ca5bf78e8a25840b610750cee92b369b3?d=identicon)[ed-fruty](/maintainers/ed-fruty)

---

Top Contributors

[![ed-fruty](https://avatars.githubusercontent.com/u/3379337?v=4)](https://github.com/ed-fruty "ed-fruty (6 commits)")

---

Tags

phplaravelmigrationnamespacemigrator

### Embed Badge

![Health badge](/badges/ed-fruty-laravel4-namespace-migrator/health.svg)

```
[![Health](https://phpackages.com/badges/ed-fruty-laravel4-namespace-migrator/health.svg)](https://phpackages.com/packages/ed-fruty-laravel4-namespace-migrator)
```

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[dragon-code/laravel-deploy-operations

Performing any actions during the deployment process

240173.5k2](/packages/dragon-code-laravel-deploy-operations)[awssat/laravel-sync-migration

Laravel tool helps to sync migrations without refreshing the database

10923.2k](/packages/awssat-laravel-sync-migration)[chrishalbert/laravel-nomadic

A suite of tools to enhance robustness of laravel's migrations.

3127.1k](/packages/chrishalbert-laravel-nomadic)[salehhashemi/laravel-repository

Implementing the repository pattern for Laravel projects.

2010.5k](/packages/salehhashemi-laravel-repository)

PHPackages © 2026

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