signifly / laravel-database-refactors
Add database refactors to your Laravel app.
Installs: 24 000
Dependents: 0
Suggesters: 0
Security: 0
Stars: 24
Watchers: 5
Forks: 3
Open Issues: 0
Requires
- php: ^7.2.5|^8.0
- illuminate/console: ^6.0|^7.0|^8.0
- illuminate/database: ^6.0|^7.0|^8.0
- illuminate/filesystem: ^6.0|^7.0|^8.0
- illuminate/support: ^6.0|^7.0|^8.0
Requires (Dev)
- orchestra/testbench: ^4.0|^5.0|^6.0
- phpunit/phpunit: ^7.0|^8.0|^9.0
This package is auto-updated.
Last update: 2024-10-21 19:21:52 UTC
README
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.
Basic Usage
In order to generate a new refactor file, you may use the following command:
php artisan make:refactor UsersTableRefactor
The file will be located in the database/refactors
folder.
Testing
composer test
Security
If you discover any security issues, please email dev@signifly.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.