Skip to content

pactode/laravel-database-refactors

 
 

Repository files navigation

Add database refactors to your Laravel app

Latest Version on Packagist Build Status StyleCI Quality Score Total Downloads

The signifly/laravel-database-refactors package allows you to easily add database refactors to your Laravel app.

Below is a small example of how to use it.

Run the refactor in terminal:

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

or programatically in a migration:

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

IMPORTANT! Update your composer.json file in order to autoload the database refactors:

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

Installation

You can install the package via composer:

composer require signifly/laravel-database-refactors

The package will automatically register itself.

Testing

composer test

Security

If you discover any security issues, please email [email protected] instead of using the issue tracker.

Credits

License

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

About

Add database refactors to your Laravel app

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%