Commit 6405175d authored by Taylor Otwell's avatar Taylor Otwell

Merge pull request #819 from jasonlewis/patch-11

Allow checking of named view existance.
parents fc96014c a5cc8616
......@@ -118,6 +118,11 @@ class View implements ArrayAccess {
*/
public static function exists($view, $return_path = false)
{
if (starts_with($view, 'name: ') and array_key_exists($name = substr($view, 6), static::$names))
{
$view = static::$names[$name];
}
list($bundle, $view) = Bundle::parse($view);
$view = str_replace('.', '/', $view);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment