I have a question. I have a forms with two fields one is a input
and the other is a select
when doing the search of the two fields does not bring me anything. Here I put my query:
$titulo = $request->get(‘titulo’);
$provincia = $request->get(‘provincia’);
$empleos = Empleo::orderBy(‘id’,‘DESC’) ->where(‘titulo’,‘LIKE’,"%$titulo%") ->where(‘provincia’, ‘LIKE’, “%$provincia%”) ->paginate(5);
Here my form:
{!! Form::open([‘route’ => ‘busquedaprincipal’, ‘method’=>‘GET’]) !!}
{!! Form::text(‘titulo’, null, [‘class’ => ‘form-control form-control-lg’, ‘placeholder’ => ‘Buscar’]); !!}
{!! Form::select(‘provincia’, [‘euskadi’ => ‘Euskadi’, ‘alava’ => ‘Alava’, ‘bizkaia’ => ‘Bizkaia’, ‘guipuzkoa’ => ‘Guipuzkoa’], null, [‘class’ => ‘custom-select form-control form-control-lg’, ‘placeholder’ => ‘¿Donde?’, ‘id’ => ‘provincia’]); !!}
{!! Form::submit(‘Buscar’, [‘class’ => ‘btn btn-primary btn-lg my-sm-3 boton border-0’]) !!}
{!! Form::close() !!}