Update UserObserver

pull/334/head
Daniel Supernault 2018-07-23 12:53:49 -06:00
rodzic 77cd0f92c5
commit 72d48696ef
1 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

@ -2,7 +2,7 @@
namespace App\Observers;
use App\{Profile, User};
use App\{Profile, User, UserSetting};
use App\Jobs\AvatarPipeline\CreateAvatar;
class UserObserver
@ -36,6 +36,12 @@ class UserObserver
CreateAvatar::dispatch($profile);
}
if(empty($user->settings)) {
$settings = new UserSetting;
$settings->user_id = $user->id;
$settings->save();
}
}
}