Разделы
Veselov CV | vvShop © 2008 – 2017
Контакты
email: igor@veselov.sumy.ua
skype: utz0r2
» » 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
Вверх