Added "view.filter" event so we can hook in final filters.

This commit is contained in:
Taylor Otwell 2012-09-26 10:43:34 -04:00
parent 14c6ff1692
commit a976c555e6
1 changed files with 11 additions and 1 deletions

View File

@ -367,7 +367,17 @@ public function get()
ob_get_clean(); throw $e;
}
return ob_get_clean();
$content = ob_get_clean();
// The view filter event gives us a last chance to modify the
// evaluated contents of the view and return them. This lets
// us do something like run the contents through Jade, etc.
if (Event::listeners('view.filter'))
{
return Event::first('view.filter', $content);
}
return $content;
}
/**