Edit File: 2023_10_28_165690_create_settlements_table.php
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateSettlementsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('settlements', function (Blueprint $table) { $table->id(); $table->string('order_num', 50); //! create with new order dynamic //? admin, user, provider, delegate $table->integer('transactionable_id')->unsigned(); $table->string('transactionable_type', 50); $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