public function socialAccounts() { return $this->hasMany(SocialAccount::class); }
/** * Remove the given user from storage, Delete all related content. * @param User $user */ public function destroy(User $user) { $user->socialAccounts()->delete(); $user->delete(); }