Code Duplication    Length = 30-32 lines in 2 locations

database/migrations/2018_05_25_000000_create_card_table.php 1 location

@@ 7-38 (lines=32) @@
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
7
class CreateCardTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::create('card', function (Blueprint $table) {
17
            $table->bigIncrements('id');
18
            $table->string('title');
19
            $table->string('slug', 100);
20
            $table->boolean('active')->default(true);
21
            $table->text('content');
22
            $table->text('meta_description')->nullable();
23
            $table->integer('views')->default(0);
24
            $table->integer('category_id');
25
            $table->timestamps();
26
        });
27
    }
28
29
    /**
30
     * Reverse the migrations.
31
     *
32
     * @return void
33
     */
34
    public function down()
35
    {
36
        Schema::drop('card');
37
    }
38
}
39

database/migrations/2018_05_25_000000_create_category_table.php 1 location

@@ 7-36 (lines=30) @@
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
7
class CreateCategoryTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::create('card_category', function (Blueprint $table) {
17
            $table->bigIncrements('id');
18
            $table->string('title');
19
            $table->boolean('active')->default(true);
20
            $table->string('color')->default('black');
21
            $table->text('description')->nullable();
22
            $table->integer('parent')->default(0);
23
            $table->timestamps();
24
        });
25
    }
26
27
    /**
28
     * Reverse the migrations.
29
     *
30
     * @return void
31
     */
32
    public function down()
33
    {
34
        Schema::drop('card_category');
35
    }
36
}
37