Create migration for user_space table
ADD
database/migrations/2018_10_02_190502_create_user_space_table.php
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreateUserSpaceTable extends Migration {
+ public function up() {
+ Schema::create('user_space', function (Blueprint $table) {
+ $table->increments('id');
+ $table->unsignedInteger('user_id');
+ $table->unsignedInteger('space_id');
+ });
+ }
+
+ public function down() {
+ Schema::dropIfExists('user_space');
+ }
+}

Create migration for user_space table