1. Go to this page and download the library: Download maduser/argon-twig library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
maduser / argon-twig example snippets
use Maduser\Argon\Twig\Provider\TwigServiceProvider;
$container->register(TwigServiceProvider::class);
use Maduser\Argon\Twig\Config\TwigParameter;
$container->getParameters()->set(TwigParameter::DEFAULT_PATH, __DIR__ . '/../templates');
use Maduser\Argon\Container\AbstractServiceProvider;
use Maduser\Argon\Container\ArgonContainer;
use Maduser\Argon\Twig\TemplatePathRegistry;
final class AuthServiceProvider extends AbstractServiceProvider
{
#[\Override]
public function register(ArgonContainer $container): void
{
$registry = $container->get(TemplatePathRegistry::class);
$registry->addPath(__DIR__ . '/resources/templates', 'auth');
}
}