Skip to content

Instantly share code, notes, and snippets.

@Cerwyn
Created April 24, 2020 00:11
Show Gist options
  • Save Cerwyn/e4906841a96e4cd1117e930639d3e2f7 to your computer and use it in GitHub Desktop.
Save Cerwyn/e4906841a96e4cd1117e930639d3e2f7 to your computer and use it in GitHub Desktop.
many-to-many
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateEventsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('events', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('event_name');
$table->string('event_detail')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('events');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment