database/migrations/2020_01_01_000001_create_contacts_table.php
<?php declare(strict_types=1);use Illuminate\Support\Facades\Schema;use Illuminate\Database\Schema\Blueprint;use Illuminate\Database\Migrations\Migration; class CreateContactsTable extends Migration{ public function up() { Schema::create(config('rinvex.contacts.tables.contacts'), function (Blueprint $table) { // Columns $table->increments('id'); $table->morphs('entity'); $table->string('given_name'); $table->string('family_name')->nullable(); $table->string('title')->nullable(); $table->string('organization')->nullable(); $table->string('email')->nullable(); $table->string('phone')->nullable(); $table->string('fax')->nullable(); $table->string('country_code', 2)->nullable(); $table->string('language_code', 2)->nullable(); $table->date('birthday')->nullable(); $table->string('gender')->nullable(); $table->string('national_id_type')->nullable(); $table->string('national_id')->nullable(); $table->string('source')->nullable(); $table->string('method')->nullable(); $table->text('notes')->nullable(); $table->timestamps(); $table->softDeletes(); }); } public function down() { Schema::dropIfExists(config('rinvex.contacts.tables.contacts')); }}