PHPackages                             talandis/lara-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. [Database &amp; ORM](/categories/database)
4. /
5. talandis/lara-migrations

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

talandis/lara-migrations
========================

Laravel migrations for using outside Laravel

0.0.6(10y ago)124MITPHPPHP &gt;=5.4.0

Since Jul 1Pushed 10y ago1 watchersCompare

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

READMEChangelogDependencies (6)Versions (7)Used By (0)

Laravel migrations for using outside Laravel
============================================

[](#laravel-migrations-for-using-outside-laravel)

This is not an official Laravel package. This package was built when I wished to have Laravel migrations in any other projects that is not using Laravel.

### Installation

[](#installation)

1. Require this package with composer:

```
composer require talandis/lara-migrations

```

2. Create `migrations` folder in you project's root directory

### Configuration

[](#configuration)

1. After updating composer, create an executable file that runs migrator in your project's root folder. Sample file named `artisan` is included in this repository.
2. Create folder named `migrations`. All migration files will be stored here. You may change path to this folder in `artisan` file.
3. Set database configuration

#### Database configuration

[](#database-configuration)

For migrations to work you have to setup database credentials. To do that you should call registerContainerItem with first parameter 'db-config' and second parameter should return an array with configuration

Sample array of database configuration

```
[
    'driver' => 'mysql',
    'host' => 'localhost',
    'database' => 'sample_db',
    'username' => 'root',
    'password' => 'super_secret_pass',
    'charset' => 'utf8',
    'prefix' => '',
    'collation' => 'utf8_general_ci',
    'schema' => 'public'
]
```

### Usage

[](#usage)

There are only two commands that looks completely the same as in Laravel

#### Create new migration

[](#create-new-migration)

```
php artisan make:migration my_new_migration_name

```

#### Execute migrations

[](#execute-migrations)

```
php artisan migrate

```

Migration with custom database

```
php artisan migrate --database=development

```

### Environments support

[](#environments-support)

There is an optional argument for migrate command named `--database=...`. When using this argument you might want to modify your `db-config` item to reflect to that variable.

#### Sample

[](#sample)

Sample with environments in separate configuration files. The following sample presumes your configuration file defines 4 constants.

```
$migrator->registerContainerItem( 'db-config', function ($c) {

    require_once( $c['config-path'] . $c['environment'] . '.php');

    return [
        'driver' => 'mysql',
        'host' => DB_HOST,
        'database' =>  DB_NAME,
        'username' => DB_USERNAME,
        'password' => DB_PASSWORD,
        'charset' => 'utf8',
        'prefix' => '',
        'collation' => 'utf8_general_ci',
        'schema' => 'public'
    ];
} );
```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

6

Last Release

3651d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1848060?v=4)[shazo](/maintainers/shazo)[@shazo](https://github.com/shazo)

---

Top Contributors

[![talandis](https://avatars.githubusercontent.com/u/1598160?v=4)](https://github.com/talandis "talandis (8 commits)")

### Embed Badge

![Health badge](/badges/talandis-lara-migrations/health.svg)

```
[![Health](https://phpackages.com/badges/talandis-lara-migrations/health.svg)](https://phpackages.com/packages/talandis-lara-migrations)
```

###  Alternatives

[illuminate/queue

The Illuminate Queue package.

20432.2M1.5k](/packages/illuminate-queue)[laravel/ai

The official AI SDK for Laravel.

1.0k2.1M165](/packages/laravel-ai)[spatie/laravel-health

Monitor the health of a Laravel application

87411.3M154](/packages/spatie-laravel-health)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45344.0k1](/packages/pressbooks-pressbooks)[laragear/populate

Populate your database with a supercharged, continuable seeder

8713.1k](/packages/laragear-populate)

PHPackages © 2026

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