Added View::render_each and Blade shortcut.
This commit is contained in:
@@ -18,6 +18,7 @@ class Blade {
|
||||
'yields',
|
||||
'section_start',
|
||||
'section_end',
|
||||
'render_each',
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -238,6 +239,19 @@ class Blade {
|
||||
return preg_replace('/@endsection/', '<?php \\Laravel\\Section::stop(); ?>', $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rewrites Blade @render_each statements into View statements.
|
||||
*
|
||||
* @param string $value
|
||||
* @return string
|
||||
*/
|
||||
protected static function compile_render_each($value)
|
||||
{
|
||||
$pattern = static::matcher('render_each');
|
||||
|
||||
return preg_replace($pattern, '$1<?php \\Laravel\\View::render_each$2; ?>', $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the regular expression for a generic Blade function.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user