Last active
March 6, 2017 12:35
-
-
Save em7v/6bdd145e5d576e9c37702b58b4b196c3 to your computer and use it in GitHub Desktop.
Example RouteCollection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static function get($url, $controllerAndAction, $option) | |
{ | |
self::parseOptions() | |
self::add(...) | |
} | |
protected static function parseOptions($options){ | |
... | |
} | |
public static function post($url, $controllerAndAction ,$option) | |
{ | |
self::add(...) | |
} | |
// Usage | |
RouteCollection::get('/test', 'Controller@action', ['middleware' => 'testMiddleware']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment