Window
files. Hence, they inherit all properties of their
parent window. In earlier versions of the framework, Routes are created by extending to the
parent Window
class. However, a new class Route
has been added to version
2.6
. This new class will provide more meaning to the Route files while in future updates, it may contain methods which
are route specific.
Window
class, we can extend to the Route
class.
<?php namespace spoova\mi\windows\Routes; use Route; class Home extends Route { function __construct(){ self::call($this, [ 'home' => 'home', 'home/user' => 'user', ]); } function home() { //This method is called on '{domain}/home' url. } function user() { //This method is called on '{domain}/home/user' url. } }