模型怎么优雅的关联查询?
CarBrowse::join('cars', 'car_browses.car_id', '=', 'cars.id')
->where('cars.user_id', \auth('api')->id())
->count();
这样写好像不是很优雅
推荐文章: