app/Models/User.php
/**
     * Get friend record to specific user
     *
     * @param User $user
     */
Get friend record to specific user
@param User $user
Get friend record to specific user @param User $user
public function friend($user = null)
    {
        if (null === $user) {
            $user = auth()->user();
        }
        return $this->friends_all()->where('friends.friend_id', $user->id)->first();
    }
public function friend ( $ user = null ) { if ( null === $ user ) { $ user = auth ( ) -> user ( ) ; } return $ this -> friends_all ( ) -> where ( 'friends.friend_id' , $ user -> id ) -> first ( ) ; }
Get friend record to specific user
 @param User $user
Get friend record to specific user @param User $user