-1
난 그냥 문서처럼 withCount() 메소드를 사용하려고 노력하고 항상 난이 오류 : 정의되지 않은 메서드를 분명히 \ 데이터베이스 \ 쿼리 \ 빌더 :: withCount()Laravel5.2 withCount하지
public function index($id)
{
$data = \App\Institute::find($id);
if(!$data)
return response()->json(['message' => trans('system.notFound')])->setStatusCode(404);
$users = \App\MainArea::withCount('institute')->where('institute_id',$id)->get();
return $users;
}
에 전화
제안 사항이 있으십니까?
5.2 이니? – tkausl
나는 동일한 문제를 시도 할 수 있습니까? –
방금 프로젝트 중 하나를 사용해 보았습니다. 제게는 효과가 있습니다. – tkausl