Beispiel #1
0
 public static function singleRoute($controller, string $path = null, string $name = null)
 {
     $route = new Route();
     $route->handler($controller);
     if ($path !== null) {
         $route->path($path);
     }
     if ($name !== null) {
         $route->name($name);
     }
     return new static([$route]);
 }