email: [email protected]
skype: utz0r2
github: utz0r2
Разделы: CSS, HTML, PHP, JS, Видео, Заметки
vvStore | vvShop
© 2008 – 2019
» » 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
Вверх