Разделы
Veselov CV | vvShop © 2008 – 2022
Контакты
email:
skype:
» » Eloquent

rennokki/befriended - laravel пакет friendship модели (фоловинг блок лайки и фильтр контента)


$bob = User::where('username', 'john')->first();
$alice = User::where('username', 'alice')->first();

User::filterFollowingsOf($bob)->get(); // You will get no results.
User::filterUnfollowingsOf($bob)->get(); // You will get Alice.

$bob->follow($alice);
User::filterFollowingsOf($bob)->get(); // You will get Alice as result.

https://github.com/rennokki/befriended
Вверх