isempty laravel code example
Example 1: collection empty laravel
$isempty = $collection->isEmpty();
Example 2: pluck laravel
$name = DB::table('users')->where('name', 'John')->pluck('name');
$isempty = $collection->isEmpty();
$name = DB::table('users')->where('name', 'John')->pluck('name');