Code Duplication    Length = 27-27 lines in 2 locations

app/database/migrations/20160706232752_create_roles_table.php 1 location

@@ 4-30 (lines=27) @@
1
<?php
2
use Illuminate\Database\Capsule\Manager as Capsule;
3
4
class CreateRolesTable
5
{
6
    /**
7
     * Do the migration
8
     */
9
    public function up()
10
    {
11
        Capsule::schema()->create('roles', function($table)
12
        {
13
            $table->increments('id');
14
            $table->string('name')->unique();
15
            $table->string('description');
16
            $table->integer('created_by');
17
            $table->integer('updated_by')->nullable();
18
            $table->timestamps();
19
            $table->softDeletes();
20
        });
21
    }
22
23
    /**
24
     * Undo the migration
25
     */
26
    public function down()
27
    {
28
        Capsule::schema()->drop('roles');
29
    }
30
}
31

app/database/migrations/20160706232835_create_rights_table.php 1 location

@@ 4-30 (lines=27) @@
1
<?php
2
use Illuminate\Database\Capsule\Manager as Capsule;
3
4
class CreateRightsTable
5
{
6
    /**
7
    * Do the migration
8
    */
9
    public function up()
10
    {
11
        Capsule::schema()->create('rights', function($table)
12
        {
13
            $table->increments('id');
14
            $table->string('name')->unique();
15
            $table->string('description');
16
            $table->integer('created_by');
17
            $table->integer('updated_by')->nullable();
18
            $table->timestamps();
19
            $table->softDeletes();
20
        });
21
22
    }
23
24
    /**
25
    * Undo the migration
26
    */
27
    public function down()
28
    {
29
        Capsule::schema()->drop('rights');
30
    }
31
}
32