This repository has been archived on 2024-05-20. You can view files and clone it, but cannot push or open issues or pull requests.
PriceyBotPanel/database/migrations/2023_10_10_200426_create_logs_table.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');
}
};