Skip to content

Instantly share code, notes, and snippets.

@heidilux
Last active August 29, 2015 13:57
Show Gist options
  • Save heidilux/9421101 to your computer and use it in GitHub Desktop.
Save heidilux/9421101 to your computer and use it in GitHub Desktop.
PHP Storm popping error on the break statement
```
@foreach ($user->orders->reverse() as $i => $line)
<tr>
<td>G-E-{{ $line->id }}</td>
<td>${{ $line->sale_price }}</td>
<td>{{ $line->created_at->format('F j, Y') }}</td>
<td class="text-right"><a href="{{ route('orderDetail', $line->id) }}" class="btn btn-default">Details <i class="fa fa-chevron-right"></i></a></td>
</tr>
@if ($i == 2)
<?php break; ?>
@endif
@endforeach
```
@heidilux
Copy link
Author

heidilux commented Mar 7, 2014

The point of this was to get the last three orders from the database and display them in reverse order. It actually totally works. PHPStorm just pops up an error that says 'Cannot break/continue 1 level(s)'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment