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

  Quote

KARABAY A, 2019 . Laravel Befriended Package,

https://www.karabayyazilim.com/blog/php/framework/laravel/laravel-befriended-paketi-2019-11-02-135150

(Accessed November 02, 2019).


  Share this post

Comments (0)

Comment

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