/
home
/
u694682534
/
domains
/
blackbooks.me
/
public_html
/
almaher2
/
database
/
migrations
/
Upload File
HOME
<?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('contact_has_appartements', function (Blueprint $table) { $table->increments('id'); $table->integer('contact_id')->unsigned(); $table->foreign('contact_id')->references('id')->on('contacts')->onDelete('cascade'); $table->integer('appartement_id')->unsigned(); $table->foreign('appartement_id')->references('id')->on('appartements')->onDelete('cascade'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('contact_has_appartements'); } };