Please help me figure it out. I've searched hundreds of articles and can't figure it out. I connect the template in accordance with the documentation:
return $this->render('LoginPassAuthBundle::login.html.twig', [
'name' => 'auth',
]);
But I get the error
Unable to find template "LoginPassAuthBundle::login.html.twig" (looked into: /var/www/html/templates).
I've tried all sorts of different options, but I still get errors.
// /bundles/LoginPassAuthBundle/src/Resources/views/login.html.twig
========>> Unable to find template "/bundles/LoginPassAuthBundle/src/Resources/views/login.html.twig" (looked into: / var / www / html / templates).
// @ LoginPassAuthBundle / src / Resources / views / login.html.twig
========>> There are no registered paths for namespace "LoginPassAuthBundle".
// @LoginPassAuthBundle :: login.html.twig
========>> Malformed namespaced template name "@LoginPassAuthBundle :: login.html.twig" (expecting "@ namespace / template_name").
// LoginPassAuthBundle :: login.html.twig
========>> Unable to find template "LoginPassAuthBundle :: login.html.twig" (looked into: / var / www / html / templates).
// /src/vendor/lavarich/loginpassauth/src/Resources/views/login.html.twig
========>> Unable to find template "/src/vendor/lavarich/loginpassauth/src/Resources/views/login.html.twig" (looked into: / var / www / html / templates).
My bundle is located in the / bundles / LoginPassAuthBundle / directory and is referenced in the vendor directory. I added it to composer.json and installed using flex
"repositories": [
{
"type": "path",
"url": "./bundles/UsersBundle"
},
{
"type": "path",
"url": "./bundles/LoginPassAuthBundle"
}
]
Also added it to routes.yaml
loginpassauth:
resource: 'lavarich\LoginPassAuthBundle\src\Controller\AuthController'
type: annotation
And services.yaml
lavarich\LoginPassAuthBundle\src\Controller\AuthController:
public: true
tags: ['container.service_subscriber']