laravel-migration
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.