Laravel solo obtiene las identificaciones de una matrices elocuente
$post_ids = Post::pluck('id')->toArray();
Akash
$post_ids = Post::pluck('id')->toArray();