如何使用雄辩的而非查询构建器来检索我已阻止的用户的名称 模型是Users,在此enttey中,BlockedUsers是user_id,blockedUserID及其一对多,
public function getBlocked(){
$blocked = BlockedUsers::find($this->id)->BlockedUsers;
// $blockedUsers = DB::table('users')->Join('block_lists','users.id','=', 'block_lists.blockedID')->get();
// $blockedUsers = User::Join('block_lists','block_lists.blockedID','=', 'users.id')->get();
return response()->json(['blocked' => $blocked]);
}