laravel collection get array code example Example: pluck laravel $name = DB::table('users')->where('name', 'John')->pluck('name');