123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- /**
- * Created by PhpStorm.
- * User: Administrator
- * Date: 2019/6/5
- * Time: 16:03
- */
- namespace App\Repositories\Circle;
- use App\Models\InterestCircle;
- use App\Models\InterestCircleArticle;
- use App\Models\InterestCircleUser;
- use App\Models\Post;
- use Illuminate\Database\QueryException;
- use Dingo\Api\Http\Response;
- use Illuminate\Support\Carbon;
- use Illuminate\Support\Facades\DB;
- use Illuminate\Support\Facades\Log;
- use Illuminate\Support\Facades\Redis;
- class CircleMemberRepository
- {
- public function __construct(InterestCircle $interestCircle,
- InterestCircleUser $interestCircleUser
- )
- {
- $this->interestCircle = $interestCircle;
- $this->interestCircleUser = $interestCircleUser;
- }
- /**
- * 成员列表
- */
- public function lists($request)
- {
- $perPage = isset($request['per_page']) ? $request['per_page'] : 20;
- //$where[] = ['is_black', 0];
- $where[] = ['circle_id', $request['id']];
- $userModel = $this->interestCircleUser;
- return $userModel
- ->where($where)
- ->orderBy('id', 'desc')
- ->paginate($perPage);
- }
- }
|