laravel work with collections example
Example 1: pluck laravel
$name = DB::table('users')->where('name', 'John')->pluck('name');
Example 2: laravel pluck
$users = Users::pluck('name','email');
dd($users);
$name = DB::table('users')->where('name', 'John')->pluck('name');
$users = Users::pluck('name','email');
dd($users);