Hmm that is strange. As far as I understand php, if you cast the object to an array and dump it, and the key is there, it's there.
Once cast to array you are no longer working with an object, just an array, and there is no 'protection' for keys on an array.
You don't get a 'undefined index' error when calling $user_array['id'] ? That means the index does indeed exist. (by default, php does not throw an exception for undefined index, however laravel does)
I have had many instances where I was overlooking something simple, such as re-declaring the variable inside the loop so it gets overwritten every iteration, or trying to compare with a single '=' sign instead of double equals '==' (which instead overwrites the variable)
I.E.
$variable = 'not_test';
if($variable == 'test') {
// this will not execute
}
if($variable = 'test') {
// this will execute and now $variable = 'test';
}
I suspect something of this nature, though I could be wrong. Otherwise I'm baffled. Heh.