Merge pull request #831 from jasonlewis/feature/blade-break

Added an @break to blade to break out of loops.
This commit is contained in:
Taylor Otwell 2012-06-20 09:43:15 -07:00
commit 1f9f064bf6
1 changed files with 1 additions and 1 deletions

View File

@ -278,7 +278,7 @@ protected static function compile_structure_openings($value)
*/
protected static function compile_structure_closings($value)
{
$pattern = '/(\s*)@(endif|endforeach|endfor|endwhile)(\s*)/';
$pattern = '/(\s*)@(endif|endforeach|endfor|endwhile|break)(\s*)/';
return preg_replace($pattern, '$1<?php $2; ?>$3', $value);
}