container->share(SlugifyInterface::class, function () { $options = []; if ($this->container->has('config.slugify.options')) { $options = $this->container->get('config.slugify.options'); } $provider = null; if ($this->container->has(RuleProviderInterface::class)) { /* @var RuleProviderInterface $provider */ $provider = $this->container->get(RuleProviderInterface::class); } return new Slugify( $options, $provider ); }); } }