<div class="container"> <div class="form-group"> <div class="col-sm-7 col-xs-12 text-center"> {{ Form::open(array('id'=>'formAActividad', 'role'=>'form')) }} <span class="mensajeError alert-danger"></span> <div class="form-group row"> {{ Form::label('nombre', 'Indica el nombre de la actividad', array('class' => 'col-sm-5'))}} {{ Form::text('nombre', '', array('class' => 'col-xs-5')) }} </div> <div class="form-group row"> {{ Form::label('profesor_id', 'Selecciona al profesor', array('class' => 'col-sm-5'))}} <?php $collection = DB::table('datos_profesor')->join('profesores', 'profesores.id', '=', 'datos_profesor.profesor_id')->join('academias_profesores', 'profesores.id', '=', 'academias_profesores.profesores_id')->where('academias_profesores.academias_id', '=', Academia::academiaPDAActual())->select('profesores.id', DB::raw('CONCAT(datos_profesor.nombre, " ", datos_profesor.apellido_paterno, " ", datos_profesor.apellido_materno) as nombre'))->orderBy('datos_profesor.nombre')->get(); $arreglo = array(); foreach ($collection as $clave => $valor) { if ($valor->nombre == Profesor::nombre()) { $valor->nombre = $valor->nombre . " (TU)"; } $arreglo[$valor->id] = $valor->nombre; } ?> {{ Form::select('profesor_id', $arreglo, null, array('class' => 'col-sm-5')) }} </div> {{ Form::submit('Añadir', array('class'=>'btn btn-lg btn-primary')) }} {{ Form::close() }} </div> </div> <table id="tablaAActividadProfesor" class="table table-bordered table-responsive table-striped table-hover tablaCRUD ocultar"> <thead> <tr> <th>ID</th>