Skip to content

Commit

Permalink
Update content about count
Browse files Browse the repository at this point in the history
  • Loading branch information
natanfelles committed May 18, 2023
1 parent e31d894 commit 3a5db33
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion guide/index.rst
Expand Up @@ -1807,12 +1807,22 @@ The Model has some extra methods for doing common operations:
Count
"""""

A basic function to count all rows in the table.
A basic function to count rows in the table.

.. code-block:: php
$count = $model->count(); // int
Optionally, with a parameter to the WHERE clause:

.. code-block:: php
$where = [
['id', '<', 100], // WHERE `id` < 100
['name', 'like', 'Pa%'], // AND `name` LIKE 'Pa%'
];
$count = $model->count($where); // int
Replace
"""""""

Expand Down

0 comments on commit 3a5db33

Please sign in to comment.