SyntaxFix
Write A Post
Hire A Developer
Questions
Also Model::all(['id'])->toArray() it will only fetch id as array.
Model::all(['id'])->toArray()