Notifications fixes (#804)

* Emails not sending #795 #722

* Fix for news items not being sent; refactor some events; check for opt-in #722

* Formatting

* Remove extra parameter
This commit is contained in:
Nabeel S
2020-09-03 12:50:42 -04:00
committed by GitHub
parent 55fa01478d
commit e99c22b007
34 changed files with 179 additions and 54 deletions

View File

@@ -1,7 +1,9 @@
<?php
use App\Models\Airline;
use App\Models\Enums\UserState;
use Faker\Generator as Faker;
use Illuminate\Support\Facades\Hash;
$factory->define(App\Models\User::class, function (Faker $faker) {
static $password;
@@ -14,7 +16,7 @@ $factory->define(App\Models\User::class, function (Faker $faker) {
'password' => $password ?: $password = Hash::make('secret'),
'api_key' => $faker->sha1,
'airline_id' => function () {
return factory(\App\Models\Airline::class)->create()->id;
return factory(Airline::class)->create()->id;
},
'rank_id' => 1,
'flights' => $faker->numberBetween(0, 1000),