CountInDatabase
class CountInDatabase extends Constraint (View source)
Properties
| protected Connection | $database | The database connection. |
|
| protected int | $expectedCount | The expected table entries count that will be checked against the actual count. |
|
| protected int | $actualCount | The actual table entries count that will be checked against the expected count. |
Methods
Check if the expected and actual count are equal.
Get the description of the failure.
Get a string representation of the object.
Details
void
__construct(Connection $database, int $expectedCount)
Create a new constraint instance.
bool
matches(string $table)
Check if the expected and actual count are equal.
string
failureDescription(string $table)
Get the description of the failure.
string
toString(int $options = 0)
Get a string representation of the object.
Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.