<?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('pengeluaran', function (Blueprint $table) { $table->id(); $table->string('faktur')->nullable(); $table->date('tanggal')->nullable(); $table->integer('jenis_transaksi')->nullable()->comment('1 = Tunai, 2 = Transfer'); $table->integer('nominal')->nullable(); $table->string('keterangan')->nullable(); $table->foreignId('user_id')->nullable()->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('pengeluaran'); } };