35 lines
839 B
PHP
35 lines
839 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
return new class extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*/
|
|
public function up(): void
|
|
{
|
|
Schema::create('comments', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->morphs('commentable');
|
|
$table->string('name_surname');
|
|
$table->string('phone');
|
|
$table->text('body');
|
|
$table->text('admin_reply')->nullable();
|
|
$table->boolean('is_approved')->default(false);
|
|
$table->timestamps();
|
|
$table->softDeletes();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('comments');
|
|
}
|
|
};
|