Code Duplication    Length = 34-35 lines in 3 locations

src/database/migrations/create_order_items_table.php 1 location

@@ 16-49 (lines=34) @@
13
use Illuminate\Database\Schema\Blueprint;
14
use Illuminate\Database\Migrations\Migration;
15
16
class CreateOrderItemsTable extends Migration
17
{
18
    /**
19
     * Run the migrations.
20
     *
21
     * @return void
22
     */
23
    public function up()
24
    {
25
        Schema::create('order_items', function (Blueprint $table) {
26
            $table->bigIncrements('id');
27
            $table->string('order_id');
28
            $table->integer('amount');
29
            $table->integer('quantity')->default(1);
30
            $table->string("item");
31
            $table->date("date");
32
33
34
35
36
            $table->timestamps();
37
        });
38
    }
39
40
    /**
41
     * Reverse the migrations.
42
     *
43
     * @return void
44
     */
45
    public function down()
46
    {
47
        Schema::dropIfExists('order_details');
48
    }
49
}
50

src/database/migrations/create_payment_method_table.php 1 location

@@ 16-50 (lines=35) @@
13
use Illuminate\Database\Schema\Blueprint;
14
use Illuminate\Database\Migrations\Migration;
15
16
class CreatePaymentMethodTable extends Migration
17
{
18
    /**
19
     * Run the migrations.
20
     *
21
     * @return void
22
     */
23
    public function up()
24
    {
25
26
27
        Schema::create('payment_method', function (Blueprint $table) {
28
            $table->bigIncrements('id');
29
            $table->string('pmethod'); //required attribute
30
            $table->string('apikey')->nullable(); //required attribute
31
            $table->string('apisecret')->nullable(); //required attribute
32
            $table->string('applicationid')->nullable(); //required attribute
33
34
35
36
37
            $table->timestamps();
38
        });
39
    }
40
41
    /**
42
     * Reverse the migrations.
43
     *
44
     * @return void
45
     */
46
    public function down()
47
    {
48
        Schema::dropIfExists('order_details');
49
    }
50
}
51

src/database/migrations/create_payments_table.php 1 location

@@ 16-50 (lines=35) @@
13
use Illuminate\Database\Schema\Blueprint;
14
use Illuminate\Database\Migrations\Migration;
15
16
class CreatePaymentsTable extends Migration
17
{
18
    /**
19
     * Run the migrations.
20
     *
21
     * @return void
22
     */
23
    public function up()
24
    {
25
        Schema::create('payments', function (Blueprint $table) {
26
            $table->bigIncrements('id');
27
            $table->string('invoiceid'); //required attribute
28
            $table->string('orderid'); //required attribute
29
            $table->integer('amount'); //required attribute
30
            $table->string('status')->default('pending'); //required attribute
31
            $table->string('trackingid'); //required attribute
32
            $table->date("date");
33
34
35
36
37
            $table->timestamps();
38
        });
39
    }
40
41
    /**
42
     * Reverse the migrations.
43
     *
44
     * @return void
45
     */
46
    public function down()
47
    {
48
        Schema::dropIfExists('order_details');
49
    }
50
}
51