Skip to content

Commit a34e71f

Browse files
committed
✨ add page() method to Route Class
Signed-off-by: otengkwame <developerkwame@gmail.com>
1 parent 2485ddb commit a34e71f

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

Core/core/Route/Route.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public function __construct($namespace = null)
154154
// --------------------------- Utility functions ----------------------------------
155155

156156
/**
157-
* Get path to display Route:view()
157+
* Get path to display Route::view()
158158
*
159159
* @return string
160160
*/
@@ -653,6 +653,20 @@ public static function view($name = '')
653653
static::any($name, static::routeView().$name);
654654
}
655655

656+
/**
657+
* Simple route to get views
658+
* from the Views folder
659+
*
660+
* This is an alias to Route::view();
661+
*
662+
* @param $name view name to use as route
663+
* @return void
664+
*/
665+
public static function page($name = '')
666+
{
667+
static::view($name);
668+
}
669+
656670
/**
657671
* Web Resource method
658672
* Creates resource routes

0 commit comments

Comments
 (0)