leogout / SeoBundle

A Symfony bundle to generate SEO meta tags.
39 stars 18 forks source link

Symfony 5.3 Bug #24

Closed xorgxx closed 1 year ago

xorgxx commented 2 years ago

hi i try to get install but i still having this issue

Service "leogout_seo.generator.generator" not found:

can you make update ?

Thank

ucay commented 2 years ago

You can inject the service from function's parameter.

namespace App\Controller;
use Leogout\Bundle\SeoBundle\Provider\SeoGeneratorProvider;
//...

#[Route('/my-url', name: 'my_url')]
public function index(SeoGeneratorProvider $seo ): Response
{
        $seo->get('basic')
                ->setTitle('custom title')
                ->setDescription('custom description')
        ;

        return $this->render('view.html.twig');
}