I'm using Laravel 5.7 and PHP 7.3.3, both in production and locally using Valet. However, in production I'm receiving the error
count(): Parameter must be an array or an object that implements Countable
Here's my query.
$users = \App\User::whereDate('created_at', \Carbon\Carbon::today())->count();
I've read that this was an issue in PHP 7.2, and that the solution was to upgrade to Laravel 5.6. I'm past that; why am I receiving this error and how do I fix it?