PHPackages                             alteis/hagreed-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. alteis/hagreed-bundle

ActiveSymfony-bundle[Framework](/categories/framework)

alteis/hagreed-bundle
=====================

plugin hagreed in Bundle Symfony

v1.0.1(11mo ago)7631MITPHP

Since Feb 27Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/AlteisGroupe/hagreed-bundle)[ Packagist](https://packagist.org/packages/alteis/hagreed-bundle)[ RSS](/packages/alteis-hagreed-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

hagreed-bundle
==============

[](#hagreed-bundle)

Hagreed integration for Symfony – Easily manage user consents and cookies in your application, leveraging the Hagreed system.

Link site:

Configuration
-------------

[](#configuration)

### installation

[](#installation)

Hagreed Bundle requires PHP 8.2 or higher and Symfony 7.0 or higher. Run the following command to install it in your application:

```
composer require alteis/hagreed-bundle
```

### minimal require

[](#minimal-require)

Add your token to the **HAGREED\_TOKEN** variable in your `.env` file

> To create your **token**, please fill out the form on the website

```
HAGREED_TOKEN="your-token"
```

In your html.twig code, add the following functions: `{{ header_hagreed() }}` &amp; `{{ body_end_hagreed() }}`.

```

        ....
        {{ header_hagreed() }} {# Add in the header #}

        ...
        {{ body_end_hagreed() }}  {# Add towards the end of the body block #}

```

Create file `config/packages/alteis_hagreed.yaml` if not exist.

```
alteis_hagreed:
    token: '%env(HAGREED_TOKEN)%'
```

Register the bundle in your application. Edit the `config/bundles.php` file and add the following if this has not already been done

```
