public function __construct(Router $router) { $this->storagePath = storage_path() . '/templates/apidocs'; $this->router = $router; $this->routes = $router->getRoutes(); }