check this link may be its help
https://stackoverflow.com/questions/20563166/eloquent-collection-counting-and-detect-empty/20564065
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I know there are many ways like
empty($var)
is_null($var)
isset($var)
if(!$var)
But each one has different purpose. I want to have a combined function in laravel to check all these
Does laravel provide a single function to check all in one?
Need to check all possible like
NULL,null,'',0, undefined , not posted and others
Please or to participate in this conversation.