Posts by Bruno Melo de Souza • 31 points
2 posts
-
2
votes2
answers49
viewsA: Query to return minimum amount of "different" values
You can use a "group by", for that would look something like this: Cliente::groupBy('status')->select('status', DB::raw('count(*) as total'))->get(); Remember to use the DB namespace use…
-
1
votes2
answers190
viewsA: How to disable required when your input is not visible
Even using javascript if(...) { $("#seu-campo-id").removeAttr('required'); } else { $("#seu-campo-id").attr({required: 'required'}); }