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().Full Changelog: https://github.com/multicaret/laravel-acquaintances/compare/v3.7.3...v4.0.0-beta.1
Fix PHP 8.4 compatibility: Add explicit nullable type declaration for followingCountReadable #119 thanks to @Neveark
CanBeReported class. #117 thanks to @simone-biancofix: numberToReadable will return an int if the $shorthand is empty. by @jayenne
feat: new trait for reporting added by @jayenne. PR #116
followingCount() and followingCountReadable() thanks to @jayenne <3. PR #115use config variable interactions_user_id_fk_column_name #109 thanks to @adriallongarriu
Bump Laravel support to V11.
Laravel 10 support
fix: findFriendships() with params sender & recipient were not working, fixed by @beratkara
Add cursor paginate support to getFriends and getOrPaginate
config('acquaintances.rating.defaults.type')) just after a custom type rating,
will leave to an odd behaviorfeat: allow user to turn off migrations
fix: replace deprecated method studly_case()
Fix Trait helper method morph key.
Thanks to @Necmttn
Rename collision method name 'ratings' to 'ratingsTo'
close #40
Thanks to @jaulz
Thanks to @RJFares
Thanks to @jaulz
Thanks to @jaulz
Thanks to @jaulz
CanVote by replacing str_plural with Str::plural.ratings() & ratingsPure() to CanBeRated modeluser_model_class_nameMinor fix:
Removed 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
made the user_id FK type dynamic and part of configurations
How can I help you explore Laravel packages today?