-
-
Save fayqLs/480fe94b77b29093f8253fd2b2bea3c9 to your computer and use it in GitHub Desktop.
CONTAR O NÚMERO DE REGISTROS DE UMA TABELA
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# COM FILTRO | |
$qtd_produtos = Produto::where('grupo', '=', 'BEBIDAS')->count(); | |
# SEM FILTRO, TODOS OS REGISTROS | |
$qtd_produtos = Produto::count(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment