Browse Source

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

Added an @break to blade to break out of loops.
Taylor Otwell 12 years ago
parent
commit
1f9f064bf6
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);
 	}