Last active
August 29, 2015 13:57
-
-
Save heidilux/9421101 to your computer and use it in GitHub Desktop.
PHP Storm popping error on the break statement
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
@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 | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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)'