Check out example codes for "how to check if eloquent result is empty". It will help you in understanding the concepts better.

Code Example 1

Note:- Credit for this result goes to Alberto Peripolli. Copied from his Grepper.
if ($result->first()) { } 
if (!$result->isEmpty()) { }
if ($result->count()) { }
if (count($result)) { }

Learn ReactJs, React Native from akashmittal.com