I work with a school platform with laravel. But there is a part of the page where I should be able to assign teachers to groups and I no longer appear. I already checked the code and it seems fine. The error started from when I redirected the root folder to a subfolder as the main page.
{!! Form::open(['url'=> '/admin/usuariosasignar','method'=>'POST',
'files' => true,'role'=>'form','class'=>'']) !!}
<div>
<label for="materia">Asignar Usuario a Grupo</label>
</div>
<div class="input-group input-group-sm">
<input type="hidden" name="caso" value="asignar">
<input type="hidden" name="idg" value="{{$g->id}}">
<select class="form-control" name="materia" id="materia">
@foreach($usuarios as $usu)
<?php $bol=false;?>
@foreach($inscritos as $inscri)
@if($inscri->id_usuario==$usu->id AND $usu->nivel=='alumno')
<?php $bol=true;?>
@endif
@endforeach
@if($bol==false)
<option value="{{$usu->id}}">{{$usu->nombre}} {{$usu->apellidos}}</option>
@endif
@endforeach
</select>
<span class="input-group-btn">
<button class="btn btn-bordered btn-flat" type="submit" id="gen1">Asignar</button>
</span>
</div><!-- /input-group -->
{!! Form::close() !!}
This code is previously to give a little more context.
@else
@foreach($inscritos as $usuario1)
@if(Auth::user()->id==$usuario1->id_usuario AND $usuario1->id_grupo==$g->id)
<div class="box box-default collapsed-box">
<div class="box-header with-border">
<h3 class="box-title" data-widget="collapse">{{$g->grupo}}</h3><div class="box-tools pull-right">
<button class="btn btn-box-tool" data-widget="collapse">
<i class="fa fa-plus"></i></button>
</div><!-- /.box-tools -->
</div><!-- /.box-header -->
<div class="box-body">
<table class="table">
<tr>
<th style="width: 10px">#</th>
<th>Usuario</th>
<th style="width: 40px"></th>
</tr>
@foreach($inscritos as $usuario)
@if($usuario->id_grupo==$g->id)
<tr>
<td>{{$x}}.</td>
<td>{{$usuario->nombre}} {{$usuario->apellidos}}</td>
<td>
<span class="badge bg-navy">
<button style="color:white;background:transparent;border:none"
data-toggle="modal"
data-idgrupo="{{$g->id}}"
data-target="#editarmodal"
class="editar"
data-id="{{$usuario->id}}"
data-idusuario="{{$usuario->id_usuario}}"
data-nombre="{{$usuario->nombre}}"
data-apellidos="{{$usuario->apellidos}}"
data-telefono="{{$usuario->telefono}}"
data-email="{{$usuario->email}}"
>Editar</a>
</span>
</td>
</tr>
<?php $x++;?>
@endif
@endforeach
</table>
You can guide me to know where the error might be. Thanks