Download the PHP package talandis/lara-migrations without Composer
On this page you can find all versions of the php package talandis/lara-migrations. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download talandis/lara-migrations
More information about talandis/lara-migrations
Files in talandis/lara-migrations
Package lara-migrations
Short Description Laravel migrations for using outside Laravel
License MIT
Informations about the package lara-migrations
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
-
Require this package with composer:
- Create
migrations
folder in you project's root directory
Configuration
- 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. - Create folder named
migrations
. All migration files will be stored here. You may change path to this folder inartisan
file. - Set 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
Usage
There are only two commands that looks completely the same as in Laravel
Create new migration
Execute migrations
Migration with custom database
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 with environments in separate configuration files. The following sample presumes your configuration file defines 4 constants.
All versions of lara-migrations with dependencies
illuminate/database Version ^5.2
illuminate/console Version ^5.2
illuminate/filesystem Version ^5.2
pimple/pimple Version ^3.0
mockery/mockery Version ^0.9.5
symfony/process Version ^3.1