Update UserObserver

This commit is contained in:
Daniel Supernault 2018-07-23 12:53:49 -06:00
parent 77cd0f92c5
commit 72d48696ef
1 changed files with 7 additions and 1 deletions

View File

@ -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();
}
}
}