laravel validation not empty string code example
Example 1: laravel check if laravel query is empty
if ($result->first()) { }
if (!$result->isEmpty()) { }
if ($result->count()) { }
if (count($result)) { }
Example 2: check if variable is set and not empty laravel
isset($vars[1]) AND !empty($vars[1]) is equivalent to !empty($vars[1]).