Edit File: 2024_03_25_124656_create_settlements_table.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. * * @return void */ public function up() { Schema::create('settlements', function (Blueprint $table) { $table->id(); //? admin, user, provider, delegate $table->integer('transactionable_id')->unsigned(); $table->string('transactionable_type', 50); $table->text('notes')->nullable(); $table->double('amount')->default(0); $table->enum('status', ['accepted', 'pending', 'rejected'])->default('pending'); $table->string('image')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('settlements'); } };
Back to File Manager