Laravel Befriended

Right on the heels of our post about Laravel Love: Likes and Dislikes for Eloquent Models, a reader mentioned another similar package called Befriended: Eloquent Befriended brings social media-like features like following, blocking and filtering content based on following or blocked models. Laravel Befriended comes with scopes that manage filtering content that gives you easy control better what your user can see and cannot see. Befriended uses traits and contracts to implement the ability to follow, block, and like Eloquent models. Although the readme examples show the User model, it can be for any eloquent model. For example, you could allow a user to follow a model like Company or Project, to name a few. Heres a few code examples of using the follow/following features: And heres an example of interacting with a model Page which can be followed, but cannot follow other models:

Read Full Article at https://laravel-news.com/laravel-befriended

Tags: , , , , , , , , , , ,