Laravel Befriended Pack

It uses features and contracts to implement tracking, blocking, and liking Eloquent models. Readme examples User Model if it shows for any other model. For example, a user's Companyor Projectto give more names or you can allow it to follow a model such as .

Here are a few code examples of using the following features:

<?php$eric = User::where('name', 'Eric Barnes')->first();$user->follow($eric);$user->following()->count(); 1$eric->followers()->count(); 1 
You can also check if a user is following another user:
<?php$user->isFollowing($friend);$user->follows($friend); alias

Learn more

Learn more about this package rennokki / befriended from the official GitHub readme page at learn and you can install this package on your Laravel project


KARABAY A, 2019 . Laravel Befriended Package,

(Accessed November 02, 2019).

  Share this post

Comments (0)


Sign up for the email newsletter to be the first to know about my blog posts