CreateMatterLessonTable::up PHP Method

up() public method

Run the migrations.
public up ( ) : void
return void
    public function up()
    {
        Schema::create('matter_lesson', function (Blueprint $table) {
            $table->unsignedInteger('matter_id');
            $table->unsignedInteger('lesson_id');
            $table->foreign('matter_id')->references('id')->on('matters');
            $table->foreign('lesson_id')->references('id')->on('lessons');
        });
    }
CreateMatterLessonTable