public function RelatoriodeQuantidadeAlunopoderamcursartcc() { $countAprovDis = Historico::select(DB::raw('COUNT(status_his) AS cursadas'))->where('id_alu_his', $id)->where('status_his', 1)->get(); }
/** * Show the form for editing the specified resource. * * @param int id * @return Response */ public function edit($id) { $alunoConteudo = Aluno::lists('nome_alu', 'id'); $DisciplinaConteudo = Disciplina::select('componente_curricular_ccr.id AS id_ccr', 'componente_curricular_ccr.nome_ccr AS nome_ccr')->leftJoin('componente_curricular_ccr', 'componente_curricular_ccr.id', '=', 'disciplina_dis.id_ccr_dis')->lists('nome_ccr', 'id_ccr'); $historico = Historico::select('componente_curricular_ccr.id AS id_ccr', 'componente_curricular_ccr.nome_ccr AS nome_ccr', 'historico_his.id AS id_his', 'historico_his.status_his AS status_his', 'historico_his.id_alu_his AS id_alu_his', 'aluno_alu.nome_alu AS nome_alu')->leftJoin('aluno_alu', 'aluno_alu.id', '=', 'historico_his.id_alu_his')->leftJoin('componente_curricular_ccr', 'componente_curricular_ccr.id', '=', 'historico_his.id_dis_his')->paginate(10); $historicoEdit = $this->historico->find($id); if (is_null($historicoEdit)) { return Redirect::route('admin.historico', $this->idAlu); } return View::make('historico.edit', array('historicoEdit' => $historicoEdit, 'alunoConteudo' => $alunoConteudo, 'DisciplinaConteudo' => $DisciplinaConteudo, 'historico' => $historico)); }