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