1. Go to this page and download the library: Download jncinet/qihucms-user-follow library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jncinet / qihucms-user-follow example snippets
// 判断是否关注
app('user-follow')->isFollow(int $user_id, int $to_user_id);
// 创建关注关系
app('user-follow')->setFollow(int $user_id, int $to_user_id);
// 取消关注
app('user-follow')->unsetFollow(int $user_id, int $to_user_id);
// 互相关注
app('user-follow')->setEachOther(int $user_id, int $to_user_id);
// 取消相互关注
app('user-follow')->unsetEachOther(int $user_id, int $to_user_id);
// 会员关注分页列表
app('user-follow')->followPaginate(int $user_id, $status = null, $limit = 15);
// 会员粉丝分页
app('user-follow')->fansPaginate(int $user_id, $status = null, $limit = 15);