@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::table('payees', function (Blueprint $table) { |
|
16 | + Schema::table('payees', function(Blueprint $table) { |
|
17 | 17 | $table->dropForeign(['last_category_id']); |
18 | 18 | $table->foreign('last_category_id')->references('id')->on('categories')->onDelete('set null'); |
19 | 19 | }); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | public function down() |
28 | 28 | { |
29 | - Schema::table('payees', function (Blueprint $table) { |
|
29 | + Schema::table('payees', function(Blueprint $table) { |
|
30 | 30 | $table->dropForeign(['last_category_id']); |
31 | 31 | $table->foreign('last_category_id')->references('id')->on('categories'); |
32 | 32 | }); |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::table('categories', function (Blueprint $table) { |
|
16 | + Schema::table('categories', function(Blueprint $table) { |
|
17 | 17 | $table->dropForeign(['parent_id']); |
18 | 18 | $table->foreign('parent_id')->references('id')->on('categories')->onDelete('cascade'); |
19 | 19 | }); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | public function down() |
28 | 28 | { |
29 | - Schema::table('categories', function (Blueprint $table) { |
|
29 | + Schema::table('categories', function(Blueprint $table) { |
|
30 | 30 | $table->dropForeign(['parent_id']); |
31 | 31 | $table->foreign('parent_id')->references('id')->on('categories'); |
32 | 32 | }); |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('transactions', function (Blueprint $table) { |
|
16 | + Schema::create('transactions', function(Blueprint $table) { |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->integer('user_id')->unsigned(); |
19 | 19 | $table->timestamp('transaction_date')->nullable(); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | $table->timestamps(); |
31 | 31 | }); |
32 | 32 | |
33 | - Schema::table('transactions', function (Blueprint $table) { |
|
33 | + Schema::table('transactions', function(Blueprint $table) { |
|
34 | 34 | $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); |
35 | 35 | $table->foreign('status_id')->references('id')->on('transaction_status'); |
36 | 36 | $table->foreign('type_id')->references('id')->on('transaction_types'); |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::table('users', function (Blueprint $table) { |
|
16 | + Schema::table('users', function(Blueprint $table) { |
|
17 | 17 | $table->boolean('disable_status')->default(false); |
18 | 18 | }); |
19 | 19 | } |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function down() |
27 | 27 | { |
28 | - Schema::table('users', function (Blueprint $table) { |
|
28 | + Schema::table('users', function(Blueprint $table) { |
|
29 | 29 | $table->dropColumn('disable_status'); |
30 | 30 | }); |
31 | 31 | } |
@@ -8,10 +8,10 @@ |
||
8 | 8 | * |
9 | 9 | * @version 1.0 |
10 | 10 | */ |
11 | -$factory->define(App\Models\Account::class, function (Faker\Generator $faker) { |
|
11 | +$factory->define(App\Models\Account::class, function(Faker\Generator $faker) { |
|
12 | 12 | return [ |
13 | 13 | 'name' => $faker->name, |
14 | - 'user_id' => function () { |
|
14 | + 'user_id' => function() { |
|
15 | 15 | return factory(App\Models\User::class)->create()->id; |
16 | 16 | }, |
17 | 17 | ]; |
@@ -8,10 +8,10 @@ |
||
8 | 8 | * |
9 | 9 | * @version 1.0 |
10 | 10 | */ |
11 | -$factory->define(App\Models\Category::class, function (Faker\Generator $faker) { |
|
11 | +$factory->define(App\Models\Category::class, function(Faker\Generator $faker) { |
|
12 | 12 | return [ |
13 | 13 | 'name' => $faker->name, |
14 | - 'user_id' => function () { |
|
14 | + 'user_id' => function() { |
|
15 | 15 | return factory(App\Models\User::class)->create()->id; |
16 | 16 | }, |
17 | 17 | ]; |
@@ -8,7 +8,7 @@ |
||
8 | 8 | * |
9 | 9 | * @version 1.0 |
10 | 10 | */ |
11 | -$factory->define(App\Models\User::class, function (Faker\Generator $faker) { |
|
11 | +$factory->define(App\Models\User::class, function(Faker\Generator $faker) { |
|
12 | 12 | return [ |
13 | 13 | 'name' => $faker->name, |
14 | 14 | 'email' => $faker->email, |
@@ -8,7 +8,7 @@ |
||
8 | 8 | * |
9 | 9 | * @version 1.0 |
10 | 10 | */ |
11 | -$factory->define(App\Models\TransactionType::class, function (Faker\Generator $faker) { |
|
11 | +$factory->define(App\Models\TransactionType::class, function(Faker\Generator $faker) { |
|
12 | 12 | // $TypeArrayDesc = array ("Withdrawal", "Deposit", "Transfer"); |
13 | 13 | $name = implode('_', $faker->words(2)); |
14 | 14 |
@@ -8,15 +8,15 @@ |
||
8 | 8 | * |
9 | 9 | * @version 1.0 |
10 | 10 | */ |
11 | -$factory->define(App\Models\Transaction::class, function (Faker\Generator $faker) { |
|
11 | +$factory->define(App\Models\Transaction::class, function(Faker\Generator $faker) { |
|
12 | 12 | return [ |
13 | - 'user_id' => function () { |
|
13 | + 'user_id' => function() { |
|
14 | 14 | return factory(App\Models\User::class)->create()->id; |
15 | 15 | }, |
16 | - 'status_id' => function () { |
|
16 | + 'status_id' => function() { |
|
17 | 17 | return factory(App\Models\TransactionStatus::class)->create()->id; |
18 | 18 | }, |
19 | - 'type_id' => function () { |
|
19 | + 'type_id' => function() { |
|
20 | 20 | return factory(App\Models\TransactionType::class)->create()->id; |
21 | 21 | }, |
22 | 22 | 'transaction_date' => $faker->dateTimeBetween('-2 years'), |