SyntaxFix
Write A Post
Hire A Developer
Questions
this seems to work, but not sure if it's optimized for performance or not.
$request->user()->get(['id'])->groupBy('id')->keys()->all();
output:
array:2 [ 0 => 4 1 => 1 ]