/** * @return \Illuminate\Database\Eloquent\Collection|static[] */ public function getPlanillas($central_id) { $tipoEmpresa = $this->verificartipoCentral($central_id); if ($tipoEmpresa->empresa->tipo == '1') { return array('planillas' => PlanillaEspecial::where('central_id', $central_id)->with('viaje.conductor')->get(), 'tipo' => 'especial'); } else { return array('planillas' => Planilla::where('central_id', $central_id)->with('viaje.conductor')->get(), 'tipo' => 'normal'); } }
/** * @return \Illuminate\Database\Eloquent\Collection|static[] */ public function getPlanillas($central) { $planilla = Planilla::where('central_id', $central)->get(); $planilla->load('conductor'); return $planilla; }