| Total Complexity | 2 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class CreateContactsTable extends Migration |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Run the migrations. |
||
| 12 | * |
||
| 13 | * @return void |
||
| 14 | */ |
||
| 15 | public function up() |
||
| 16 | { |
||
| 17 | Schema::create('contacts', function (Blueprint $table) { |
||
| 18 | $table->id(); |
||
| 19 | $table->string('name'); |
||
| 20 | $table->string('email')->nullable(); |
||
| 21 | $table->bigInteger('phone')->nullable(); |
||
| 22 | $table->tinyInteger('gender')->default(1); |
||
| 23 | $table->string('address')->default('N/A'); |
||
| 24 | $table->boolean('favorite')->default(0); |
||
| 25 | $table->boolean('active')->default(1); |
||
| 26 | $table->timestamps(); |
||
| 27 | }); |
||
| 28 | |||
| 29 | Artisan::call('make:permission Contact --all'); |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Reverse the migrations. |
||
| 34 | * |
||
| 35 | * @return void |
||
| 36 | */ |
||
| 37 | public function down() |
||
| 40 | } |
||
| 41 | } |
||
| 42 |