CreateStripeAccountsTable::up()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 17
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 17
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 12
nc 1
nop 0
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
6
/**
7
 * Class CreateStripeAccountsTable
8
 *
9
 * @author  Mahmoud Zalt  <[email protected]>
10
 */
11
class CreateStripeAccountsTable extends Migration
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
12
{
13
14
    /**
15
     * Run the migrations.
16
     *
17
     * @return void
18
     */
19
    public function up()
20
    {
21
        Schema::create('stripe_accounts', function (Blueprint $table) {
22
            $table->increments('id');
23
            $table->string('customer_id');
24
            $table->string('card_id')->nullable();
25
            $table->string('card_funding')->nullable();
26
            $table->string('card_last_digits')->nullable();
27
            $table->string('card_fingerprint')->nullable();
28
29
            $table->integer('user_id')->unsigned();
30
            $table->foreign('user_id')->references('id')->on('users');
31
32
            $table->timestamps();
33
            $table->softDeletes();
34
        });
35
    }
36
37
    /**
38
     * Reverse the migrations.
39
     *
40
     * @return void
41
     */
42
    public function down()
43
    {
44
        Schema::drop('stripe_accounts');
45
    }
46
}
47