laravel/framework — pull request #3908 by lazychaser (2014-03-18 08:42:25+00:00)
Title: Fix relation name inconsistency

Consider a case when user defines a relation with complex name such as `surgeryTypes`. The attribute should be snake-cased (`surgery_types`). This works:

```php
$obj->surgery_types->lists('id');
```

This won't work:

```php
$obj->load('surgery_types');
```

This will work:

```php
$obj->load('surgeryTypes');
```

But the relation result will be stored under `surgeryTypes` name rather than `surgery_types`, and when user tries to access `$obj->surgery_types`, the relation will be loaded once again.

I suggest to stick with snake-cased relation names when they are eager-loaded.