RobinRadic/blade-extensions — pull request #4 by osugregor (2014-10-26 21:36:55+00:00)
Title: Improvement to the Foreach Regular Expression to Support Functions, and ...

...Properties

This new regex will support more variation instead of just a plain variable like so:
```
@foreach($value->getArray(true) as $key => $val)
```
The current matcher will screw this up badly.
One item this will not support is nested functions...
That will require a lot more effort.

My test criteria which I verified on rubular.com is:
```
@foreach(true)
@foreach($array)
@foreach($array as $key => $val)
@foreach(getArray())
@foreach(getArray() as $key => $val)
@foreach($value->array)
@foreach($value->array as $key => $val)
@foreach($value->getArray())
@foreach($value->getArray() as $key => $val)
@foreach($value->getArray(true) as $key => $val)
```