-1
모든 옵션을 가진 필터가나는이 옵션으로 선택이
public function filterIlumination($neighborhood) {
$lampModels = LampModels::all()->toArray();
$aluminumcableModels = AluminumcableModels::all()->toArray();
$reactorModels = ReactorModels::all()->toArray();
$steelconduitModels = SteelconduitModels::all()->toArray();
$ilumination = Ilumination::whereRaw('street_neighborhood_id = ?', array($neighborhood))
->with('street')
->with('neighborhood')
->with('reactor')
->with('steelconduit')
->with('aluminumcable')
->with('economyplan')
->with('lamp')->get();
return Response::json(array('ilumination' => $ilumination,
'lampModels' => $lampModels,
'aluminumcableModels' => $aluminumcableModels,
'steelconduitModels' => $steelconduitModels,
'reactorModels' => $reactorModels));
가} 내가 조건을 만들 생각을 마치 (동네 == '모두') 필터는 모두 있지만, 나는 다른 옵션을 많이 가지고 있고 이것은 너무 스마트하지 않습니다. 나는 Laravel의 문서를 체크한다. 나는 그것에 대한 어떤 것을 발견하지 못했다. 제발 누군가가 이것으로 나를 도울 수 있다면, 나는 내가하는 일을 모른다.