traitConfigureRoutes example

throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
    }

    public function __destruct()
    {
        $fs = new Filesystem();
        $fs->remove($this->cacheDir);
    }

    protected function configureRoutes(RoutingConfigurator $routes): void
    {
        $this->traitConfigureRoutes($routes);

        $routes->add('halloween', '/')->controller([$this, 'halloweenAction']);
        $routes->add('halloween2', '/h')->controller($this->halloweenAction(...));
    }

    protected function configureContainer(ContainerConfigurator $c): void
    {
        $c->parameters()
            ->set('halloween', 'Have a great day!');

        $c->services()
            
Home | Imprint | This part of the site doesn't use cookies.