I'm working with LARAVEL I have a foreach that uploads stuff to me from my database in a view. I need to select a subject to send your id to another view ...
What he does now is that when selecting different subjects, he loads the same id, and that id is the last matter of the foreach.
Does anyone know how this is done?
Code:
<div class="form-group{{ $errors->has('idc_materia') ? ' has-error' : '' }}">
<div class="col-sm-4">
<select id="" class="form-control" name="">
@foreach ($materiasxmaestro as $materiasxma)
<option value="{{$materiasxma->idc_materia}}">
{{$materiasxma->mat_nombre}}</option>
@endforeach
</select>
@if ($errors->has('idc_materia'))
<span class="help-block">
<strong>{{ $errors->first('idc_materia') }}</strong>
</span>
@endif
<br/>
</div>
<a href="{{ route('k_calificacion.create', $materiasxma->idc_materia)}}"
name="category"class="btn btn-info btn-md">Calificar grupo</a>
</div>