id(); $table->unsignedBigInteger('course_id')->nullable(); $table->foreign('course_id')->nullable()->references('id')->on('courses')->onUpdate('cascade')->onDelete('cascade'); $table->unsignedBigInteger('court_id')->nullable(); $table->foreign('court_id')->nullable()->references('id')->on('courts')->onUpdate('cascade')->onDelete('cascade'); $table->unsignedBigInteger('instructor_id')->nullable(); $table->foreign('instructor_id')->nullable()->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade'); $table->datetime('date')->nullable(); $table->string('from')->nullable(); $table->string('to')->nullable(); $table->string('note')->nullable(); $table->softDeletes(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('calendars'); } };