Removed add_ magic method from eloquent model as this will be a 3.2 feature.

This commit is contained in:
Taylor Otwell
2012-03-26 10:56:42 -05:00
parent a915e24b62
commit ba4d1a89c8
3 changed files with 58 additions and 12 deletions

View File

@@ -17,6 +17,8 @@ class Blade {
'structure_closings',
'else',
'includes',
'render_each',
'render',
'yields',
'yield_sections',
'section_start',
@@ -265,6 +267,32 @@ class Blade {
return preg_replace($pattern, '$1<?php echo view$2->with(get_defined_vars()); ?>', $value);
}
/**
* Rewrites Blade @render statements into valid PHP.
*
* @param string $value
* @return string
*/
protected static function compile_render($value)
{
$pattern = static::matcher('render');
return preg_replace($pattern, '$1<?php echo render$2; ?>', $value);
}
/**
* Rewrites Blade @render_each statements into valid PHP.
*
* @param string $value
* @return string
*/
protected static function compile_render_each($value)
{
$pattern = static::matcher('render_each');
return preg_replace($pattern, '$1<?php echo render_each$2; ?>', $value);
}
/**
* Rewrites Blade @yield statements into Section statements.
*