laravel get only the ids of an eloquent arrays

Solutions on MaxInterview for laravel get only the ids of an eloquent arrays by the best coders in the world

showing results for - "laravel get only the ids of an eloquent arrays"
Isabell
20 Jul 2020
1$post_ids = Post::pluck('id')->toArray();