multicaret/laravel-acquaintances
un*() methods return int — unlike(), unfollow(), unfavorite(), unsubscribe(), unview(), unreport(), and unrate() now return int (detached count) instead of array.morph_type per table (morphs, uuidMorphs, ulidMorphs) via the interactions_morph_type, friendships_morph_type, verifications_morph_type, and related config keys.cache config section with enabled, store, and ttl options. Interaction::isRelationExists() now uses an in-memory request cache and an optional persistent cache (Cache::remember) with automatic invalidation on attach/detach/toggle.withAcquaintanceCounts() Eloquent Builder macro — new AcquaintanceScopes class registers a macro to eager-load interaction counts (likers, followers, subscribers, etc.) in a single query.HasAcquaintanceCounters trait — auto-increment/decrement cached counter columns (e.g. likes_count, followers_count) on the model's table when interactions change.AcquaintancesCleanupJob — queued job to clean up all acquaintance data for a deleted model without blocking the request.Friendship, FriendshipGroups, Verification, VerificationGroups, and InteractionRelation models automatically, with Relation::enforceMorphMap() support.features config section (interactions, friendships, verifications) to selectively enable/disable features. Disabled features skip migration loading and publishing. Granular publish tags added: acquaintances-migrations-interactions, acquaintances-migrations-friendships, acquaintances-migrations-verifications.user_model_class_name config key allows specifying a fully qualified User model class (e.g., App\Models\Core\User) for projects with non-standard model locations.DB::transaction() wrappers — blockFriend() and blockVerification() now run inside database transactions for atomicity.^13.0 to Illuminate component constraints.Event::fake().CanBeReported class. #117followingCount() and followingCountReadable() thanks to @jayenne <3. PR #115interactions_user_id_fk_column_name PR #109sender & recipient were not working, fixed by @beratkaragetFriends and getOrPaginateconfig('acquaintances.rating.defaults.type')) just after a custom type rating,
will leave to an odd behaviorstr_plural with Str::plural.ratings() & ratingsPure() to CanBeRated modeluser_model_class_nameRemoved avoiding querying ratings when the type is set to overall
Fixed the value of userSumRatingReadable() function in CanBeRated trait.
Fixed userSumRatingReadable() function in CanBeRated trait.
Add new functions to CanBeRated trait:
Added a proper param type hint for the $target param in the following traits
user_id FK type dynamic and part of configurationsEvent::fire with Event::dispatchnumberToReadable() function to as helperCanBeFavorited trait now includes:
favoriters_count favoriters countfavoritersCountReadable() return favoriters count in readable formatfavoriters_count_readable favoriters count readable attribute addedCanBeFollowed trait now includes:
followers_count followers countfollowersCountReadable() return followers count in readable formatfollowers_count_readable followers count readable attribute addedCanBeLiked trait now includes:
likers_count likers countlikersCountFormmated() changed return type to readable number, and adding an alias to it likersCountReadable()likers_count_readable likers count readable attribute addedCanBeSubscribed trait now includes:
subscribers_count subscribers countsubscribersCountReadable() return subscribers count in readable formatsubscribers_count_readable subscribers count readable attribute addedCanBeSubscribed trait now includes:
voters_count voters countvotersCountReadable() return voters count in readable formatvoters_count_readable voters count readable attribute addedCanBeSubscribed trait now includes:
upvoters_count upvoters countupvotersCountReadable() return upvoters count in readable formatupvoters_count_readable upvoters count readable attribute addedCanBeSubscribed trait now includes:
downvoters_count downvoters countdownvotersCountReadable() return downvoters count in readable formatdownvoters_count_readable downvoters count readable attribute addedHow can I help you explore Laravel packages today?