ouiflash / laravel-migration
改进迁移文件
此包的官方仓库似乎已不存在,因此包已被冻结。
1.2.0
2019-09-18 13:51 UTC
Requires
- php: ~7.1
- illuminate/support: ^5.8|^6.0
Requires (Dev)
- phpunit/phpunit: >=7.0
- squizlabs/php_codesniffer: ^3.0
README
此小包的目的是改进 Laravel 迁移文件。
安装
通过 Composer
$ composer require ouiflash/laravel-migration
使用方法
<?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]; } }
测试
$ composer test
贡献
请参阅 CONTRIBUTING 和 CODE_OF_CONDUCT 以获取详细信息。
安全
如果您发现任何安全相关的问题,请发送电子邮件至 remi.fussien@gmail.com 而不是使用问题跟踪器。
鸣谢
许可
MIT 许可证 (MIT)。请参阅 许可文件 以获取更多信息。