Browse Source

Can now check for existance of named views.

Signed-off-by: Jason Lewis <jason.lewis1991@gmail.com>
Jason Lewis 12 years ago
parent
commit
5d6258a7b4
1 changed files with 5 additions and 0 deletions
  1. 5 0
      laravel/view.php

+ 5 - 0
laravel/view.php

@@ -118,6 +118,11 @@ class View implements ArrayAccess {
 	 */
 	 */
 	public static function exists($view, $return_path = false)
 	public static function exists($view, $return_path = false)
 	{
 	{
+		if(starts_with($view, 'name: '))
+		{
+			$view = static::$names[substr($view, 6)];
+		}
+		
 		list($bundle, $view) = Bundle::parse($view);
 		list($bundle, $view) = Bundle::parse($view);
 
 
 		$view = str_replace('.', '/', $view);
 		$view = str_replace('.', '/', $view);