31 lines
766 B
PHP
31 lines
766 B
PHP
<?php
|
|
|
|
use App\Models\Quote;
|
|
use App\Models\RequestedQuote;
|
|
use App\Models\User;
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
return new class extends Migration
|
|
{
|
|
public function up(): void
|
|
{
|
|
Schema::create('logs', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->foreignIdFor(User::class)->nullable();
|
|
$table->string('loggable_type');
|
|
$table->integer('loggable_id');
|
|
$table->string('action');
|
|
$table->text('content');
|
|
$table->string('ip');
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('logs');
|
|
}
|
|
};
|