SyntaxFix
Write A Post
Hire A Developer
Questions
You can do
$result = Model::where(...)->count();
to count the results.
You can also use
if ($result->isEmpty()){}
to check whether or not the result is empty.