2017-25 © Pedro Peláez
 

library laravel-database-refactors

Add database refactors to your Laravel app.

image

signifly/laravel-database-refactors

Add database refactors to your Laravel app.

  • Friday, May 18, 2018
  • by signifly
  • Repository
  • 3 Watchers
  • 6 Stars
  • 319 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 376 % Grown

The README.md

Add database refactors to your Laravel app

Latest Version on Packagist Build Status StyleCI Quality Score Total Downloads, (*1)

The signifly/laravel-database-refactors package allows you to easily add database refactors to your Laravel app., (*2)

Below is a small example of how to use it., (*3)

Run the refactor in terminal:, (*4)

php artisan db:refactor --class="UsersTableRefactor"

or programatically in a migration:, (*5)

// use Illuminate\Support\Facades\Artisan;
Artisan::call('db:refactor', [
    '--class' => 'UsersTableRefactor',
]);

IMPORTANT! Update your composer.json file in order to autoload the database refactors:, (*6)

    "autoload": {
        "classmap": [
            "database/seeds",
            "database/factories",
            "database/refactors"
        ],
        "psr-4": {
            "App\\": "app/"
        }
    },

Installation

You can install the package via composer:, (*7)

composer require signifly/laravel-database-refactors

The package will automatically register itself., (*8)

Basic Usage

In order to generate a new refactor file, you may use the following command:, (*9)

php artisan make:refactor UsersTableRefactor

The file will be located in the database/refactors folder., (*10)

Testing

composer test

Security

If you discover any security issues, please email dev@signifly.com instead of using the issue tracker., (*11)

Credits

License

The MIT License (MIT). Please see License File for more information., (*12)

The Versions