laravel/framework — pull request #4652 by lucasmichot (2014-06-10 11:33:46+00:00)
Title: [4.2] View : Provides dotted notation

This PR provides dotted notation for Blade engine.
The following notation would be permitted:

```php
{{ $user.name }} // => {{ $user['name'] }}
{{ $user.name or "Taylor" }} // => {{ $user['name'] or "Taylor" }}
{{ $user.birthday.year or 1990 }} // => {{ $user['birthday']['date'] or 1990 }}
```

This works exactly the same if `$user`is an object:

```php
{{ $user.name }} // => {{ $user->name }}
{{ $user.name or "Taylor" }} // => {{ $user->name or "Taylor" }}
{{ $user.birthday.year or 1990 }} // => {{ $user->birthday->date or 1990 }}
```

Of course the array value or the object attribute can either be a value or an object:

```php
{{ $user.birthday.year or 1990 }}
// => {{ $user->birthday->date or 1990 }}
// => {{ $user['birthday']['date'] or 1990 }}
// => {{ $user->birthday['date'] or 1990 }}
// => {{ $user['birthday']->date or 1990 }}
```

When using default notation with `{{ $user.name }}`, if `name` attribute or value does not exist, `null` will be returned.