Browse Source

Added an @break to blade to break out of loops.

Signed-off-by: Jason Lewis <jason.lewis1991@gmail.com>
Jason Lewis 12 years ago
parent
commit
b6cc836bf4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      laravel/blade.php

+ 1 - 1
laravel/blade.php

@@ -278,7 +278,7 @@ class Blade {
 	 */
 	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);
 	}