Hi guys I have here a small code that will load a user status with latest. My question is how can I extend this so that when example user 1 and user 2 are the same department id of 2 they can see there statuses. Just like facebook, when user 1 is friend with user 2, user 1 can see user 2 status and user 2 can also see user 1 status.
$user = Auth::user()->load(['statuses' => function($status)
{
$status->latest();
}]);
TIA :)