Commit 402d2c0554c1a2b46a7f6e8013fd8e4ca7f78a35
1 parent
9daa8f71
curso
Showing
2 changed files
with
16 additions
and
2 deletions
app/controllers/RegistrarAsistencia.php
... | ... | @@ -65,7 +65,7 @@ class RegistrarAsistencia extends \BaseController { |
65 | 65 | public function registrados($id){ |
66 | 66 | //Consulto todos los posibles asistentes |
67 | 67 | $asistentes = GraduacionUsoTic::where('asistio','=',true) |
68 | - ->where('diplomas',$id) | |
68 | + ->where('diplomas','=',$id) | |
69 | 69 | ->orderBy('cursos','asc') |
70 | 70 | ->orderBy('updated_at','asc') |
71 | 71 | ->get(); |
... | ... | @@ -73,6 +73,19 @@ class RegistrarAsistencia extends \BaseController { |
73 | 73 | return View::make('registrados') |
74 | 74 | ->with('asistentes',$asistentes); |
75 | 75 | } |
76 | + | |
77 | + | |
78 | + public function impresion($id,$curso){ | |
79 | + //Consulto todos los posibles asistentes | |
80 | + $asistentes = GraduacionUsoTic::where('asistio','=',true) | |
81 | + ->where('diplomas',$id) | |
82 | + ->where('cursos','ilike','%'.$curso.'%') | |
83 | + ->orderBy('updated_at','asc') | |
84 | + ->get(); | |
85 | + | |
86 | + return View::make('registrados') | |
87 | + ->with('asistentes',$asistentes); | |
88 | + } | |
76 | 89 | /** |
77 | 90 | * Show the form for creating a new resource. |
78 | 91 | * | ... | ... |
app/routes.php
... | ... | @@ -11,4 +11,5 @@ |
11 | 11 | | |
12 | 12 | */ |
13 | 13 | Route::any('/',array('uses' => 'RegistrarAsistencia@index', 'as' => 'index' )); |
14 | -Route::get('/registrados/{id}',array('uses' => 'RegistrarAsistencia@registrados', 'as' => 'registrados' )); | |
15 | 14 | \ No newline at end of file |
15 | +Route::get('/registrados/{id}',array('uses' => 'RegistrarAsistencia@registrados', 'as' => 'registrados' )); | |
16 | +Route::get('/registrados/{id}/{curso}',array('uses' => 'RegistrarAsistencia@impresion', 'as' => 'impresion' )); | |
16 | 17 | \ No newline at end of file | ... | ... |