ouiflash / laravel-migration
improving the migration files
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 2 322
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: ~7.1
- illuminate/support: ^5.8|^6.0
Requires (Dev)
- phpunit/phpunit: >=7.0
- squizlabs/php_codesniffer: ^3.0
README
The purpose of this small package is to improve the laravel migration files.
Install
Via Composer
$ composer require ouiflash/laravel-migration
Usage
<?php use Ouiflash\LaravelMigration\Migration; use Illuminate\Database\Schema\Blueprint; class CreateLegalStatusesTable extends Migration { public function definitions() { return [ 'legal_statuses' => function (Blueprint $table) { $table ->uuid('id') ->primary(); $table ->string('country_code') ->comment = 'ISO 3166-1 alpha-2 (e.g. FR, GB, DE, ...)'; $table ->string('name') ->comment = 'Name of the legal status'; $table ->string('description') ->nullable() ->comment = 'Description of the legal status'; $table->timestamps(); }, ]; } /** * Some data might be seeded during the migration */ public function seed() { return [new LegalStatusTableSeeder]; } }
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email remi.fussien@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.