Just using query builder:
$query= Ganado::where('id_rancho', "=", $idRancho);
if($idPasta != 0) $query->where('id_pasta', '=', $idPasta);
$animales = $query->where('id_tipoGanado', '=', $tipo)->paginate(20);
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community