hasOne(User::class, 'uid', 'uid'); } public function searchQidAttr($query, $value) { if ($value) $query->where('qid', $value); } public function searchIsFollowAttr($query, $value) { if ($value !== '') $query->where('is_follow', $value); } }