Download the PHP package banklansteve/social-interactions without Composer
On this page you can find all versions of the php package banklansteve/social-interactions. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download banklansteve/social-interactions
More information about banklansteve/social-interactions
Files in banklansteve/social-interactions
Package social-interactions
Short Description This Laravel package provides an elegant and customizable solution for adding social interaction features to your application. It supports liking, favoriting, and following/unfollowing models, making it perfect for social media platforms, community forums, or any application requiring user engagement functionality. The package is designed to be easy to integrate, lightweight, and extendable, allowing developers to quickly implement interaction features without reinventing the wheel. With support for polymorphic relationships, this package can be applied to any model, including posts, comments, users, and more, ensuring maximum flexibility for your application's needs.
License MT
Informations about the package social-interactions
Laravel Social Interactions Package
This Laravel package provides functionalities for liking, favoriting, and following/unfollowing users and content. It is designed to be used in social media-like applications where users can engage with posts, comments, and other users.
Features
- Likeable: Allows users to like posts, comments, or other types of content.
- Favoritable: Allows users to favorite other users, posts, comments, or other content.
- Followable: Allows users to follow or unfollow other users.
Installation
You can install this package via Composer.
Service Provider (Optional)
If you're using a version of Laravel earlier than 5.5 (which doesn't support package auto-discovery), you'll need to add the service provider manually to the config/app.php file.
Publish the Configuration (Optional)
If you want to customize the default configuration, you can publish the package's config file:
Usage Examples
This section should guide users on how to use your package. Since your package allows liking, favoriting, and following/unfollowing, add examples for each.
Usage
Liking Content
To use the Likeable functionality, add the Likeable trait to the model you want to make "likeable" (e.g., Post, Comment, etc.).
To like a post
To check if a user has liked a post
To remove a like
Favouriting a content/user
To enable users to favorite content, add the Favoritable trait to the model you want to make "favoritable" (e.g., Post, Comment, etc.).
Then to favourite a post/content/user;
To check if a post/content is favourited by a user
To remove a favourite
Following Users
To enable users to follow and unfollow other users, add the Followable trait to the User model.
To follow another user
To unfollow a user
To check if the authenticated user is following another user
Changelog
v1.0.0 - Initial release with like, favorite, and follow/unfollow functionalities.
Contributing
If you'd like to contribute to this package, feel free to fork the repository and submit a pull request. Please make sure your contributions follow the code style guidelines, and add tests for any new features or bug fixes.
Support
For any issues or questions, please open an issue in the GitHub repository. Thank you.