database/migrations/2020_03_14_000000_create_meta_attributes_table.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateMetaAttributesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('meta_attributes', function (Blueprint $table) {
$table->id();
$table->morphs('metable');
$table->string('group')->index()->nullable();
$table->string('key')->index();
$table->text('value')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('meta_attributes');
}
}