laravel/framework — pull request #6650 by davejamesmiller (2014-12-13 12:43:39+00:00)
Title: [4.2] Fix handling of camel case relation attributes

Currently this code, with snake-casing, doesn't use the eager-loaded data - it runs the database query again:

```php
$contacts = Contact::with('emailAddresses')->get();
$email_addresses = $contact[0]->email_addresses;
```

Whereas this code, with camel-casing, correctly uses it:

```php
$contacts = Contact::with('emailAddresses')->get();
$email_addresses = $contact[0]->emailAddresses;
```

This PR fixes it so it will always use the camel cased version in the array key, so that both spellings will return the same object.