Skip to content

Instantly share code, notes, and snippets.

@ginsengs
Last active March 6, 2017 12:35
Show Gist options
  • Save ginsengs/6bdd145e5d576e9c37702b58b4b196c3 to your computer and use it in GitHub Desktop.
Save ginsengs/6bdd145e5d576e9c37702b58b4b196c3 to your computer and use it in GitHub Desktop.
Example RouteCollection
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