Code Duplication    Length = 25-27 lines in 2 locations

database/2020_06_01_060738_create_roles_table.php 1 location

@@ 7-33 (lines=27) @@
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
7
class CreateRolesTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::create('roles', function (Blueprint $table) {
17
            $table->id();
18
            $table->string('name')->index()->unique();
19
            $table->string('display_name');
20
            $table->timestamps();
21
        });
22
    }
23
24
    /**
25
     * Reverse the migrations.
26
     *
27
     * @return void
28
     */
29
    public function down()
30
    {
31
        Schema::dropIfExists('roles');
32
    }
33
}
34

database/2020_06_01_063805_create_permissions_table.php 1 location

@@ 7-31 (lines=25) @@
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
7
class CreatePermissionsTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::create('permissions', function (Blueprint $table) {
17
            $table->id();
18
            $table->string('name')->index()->unique();
19
        });
20
    }
21
22
    /**
23
     * Reverse the migrations.
24
     *
25
     * @return void
26
     */
27
    public function down()
28
    {
29
        Schema::dropIfExists('permissions');
30
    }
31
}
32