morphedByMany(User::class, 'sociable'); } /** * Get all users that are assigned to this social. */ public function users() { return $this->morphedByMany(User::class, 'sociable')->where('sociable_type', User::class); } /** * Get all organizations that are assigned to this social. */ public function organizations() { return $this->morphedByMany(Organization::class, 'sociable')->where('sociable_type', Organization::class); ; } }