I have a model like this-
$feature_project = FeatureProject::select(
And if I return it, I am getting a output like this-
But I want t output like this-
So I need to convert the output.
But I am not finding a way without using for-each loop (make a temp array, push all elements to that array from current array with a for-each loop).
But I think there is more smart way than that in Laravel to do that.
I think Laravel Collection is used for this purpose.