count is method which will return an array.It is a query builder. So to count rows from using a ->get() is
The syntax to count a row a -> get() is
$wordCount = count($wordlist);
If you have a wordlist model, then you can use Eloquent to get a Collection and then use the Collection's count method.
Example:
$wordlist = Wordlist::where('id', '<=', $correctedComparisons)->get();
$wordCount = $wordlist->count();
By this way we will get a row count from a->get() .
0 Comment(s)