0% found this document useful (0 votes)
11 views1 page

Page Source

Download as txt, pdf, or txt
Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1/ 1

<?

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('transaction', function (Blueprint $table) {
$table->id();
$table->bigInteger('user_id')->unsigned();
$table->string('no_trans');
$table->string('total_harga');
$table->string('status');
$table->foreign('user_id')->references('id')->on('users')-
>onDelete('cascade');
$table->timestamps();
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('transaction');
}
};

You might also like