Code Duplication    Length = 12-13 lines in 2 locations

src/migrations/2017_04_02_135756_create_roles_table.php 2 locations

@@ 24-36 (lines=13) @@
21
        });
22
        Schema::create(
23
            'permissions_roles',
24
            function (Blueprint $table) {
25
                $table->increments('id');
26
                $table->integer('roles_id')->unsigned();
27
                $table->integer('permissions_id')->unsigned();
28
                $table->foreign('roles_id')
29
                    ->references('id')
30
                    ->on(config('roleManager.rolesTable'))
31
                    ->onDelete('cascade');
32
                $table->foreign('permissions_id')
33
                    ->references('id')
34
                    ->on(config('roleManager.permissionsTable'))
35
                    ->onDelete('cascade');
36
            }
37
        );
38
39
        Schema::create(
@@ 41-52 (lines=12) @@
38
39
        Schema::create(
40
            'roles_user',
41
            function (Blueprint $table) {
42
                $table->increments('id');
43
                $table->integer('user_id')->unsigned();
44
                $table->integer('roles_id')->unsigned();
45
                $table->foreign('roles_id')
46
                    ->references('id')
47
                    ->on(config('roleManager.rolesTable'))
48
                    ->onDelete('cascade');
49
                $table->foreign('user_id')
50
                    ->references('id')->on('users')
51
                    ->onDelete('cascade');
52
            }
53
        );
54
    }
55