2017 © Pedro Peláez
 

library laravel-migrate-custom-command

Creates database migration files from custom templates.

image

obarlas/laravel-migrate-custom-command

Creates database migration files from custom templates.

  • Thursday, July 10, 2014
  • by obarlas
  • Repository
  • 1 Watchers
  • 0 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

laravel-migrate-custom-command

Purpose of this package is to create database migration files from custom templates since custom migration templates are not available in Laravel., (*1)

Instead of hard coding table names in the migration class, I prefer to use global variables so I can just copy/paste the same creation and foreign key strings to other migration files easily, also I have default columns on my tables so this prevents me from rewriting every database migration file., (*2)

Usage

  • You must add the package to your app config.
'Obarlas\LaravelMigrateCustomCommand\LaravelMigrateCustomCommandServiceProvider',
  • In the src/stubs folder of the package original stubs from the Laravel package can be found, create and copy them to your database/templates folder. Now you can edit the stubs according to your needs., (*3)

  • Usage is simple, (*4)

php artisan migrate:custom stub_name class_name --table=table_name
  • migrate:custom command checks if there is a {{table}} variable in the stub file, and if no --table argument is passed it stops.

The Versions

10/07 2014

dev-master

9999999-dev

Creates database migration files from custom templates.

  Sources   Download

The Requires

 

by Omer Barlas

10/07 2014

dev-stable

dev-stable

Creates database migration files from custom templates.

  Sources   Download

The Requires

 

by Omer Barlas

29/05 2014

v0.1

0.1.0.0

Creates database migration files from custom templates.

  Sources   Download

The Requires

 

by Omer Barlas