laravel/framework — pull request #3728 by Freyskeyd (2014-02-27 21:53:05+00:00)
Title: Implement toRawJson and toRawArray

Sometime we need to get an array of all attributes, but we want to keep clean method for `toArray`.

```php
class test extends Illuminate\Database\Eloquent\Model
{
protected $visible = ['ddd'];
protected $hidden = ['bbb'];
}

$d = new test();
$d->ddd = 'bisous';
$d->bbb = 'bisousbbb';
$d->machin = 'truc';

echo json_encode($d->toRawArray()); // {"ddd":"bisous","bbb":"bisousbbb","machin":"truc"}
echo json_encode($d->toArray()); // {"bbb":"bisousbbb"}
```