That can be done in short as:
Model::pluck('column')
where model is the Model such as User
model & column as column name like id
if you do
User::pluck('id') // [1,2,3, ...]
& of course you can have any other clauses like where
clause before pluck