PHPackages                             aw-studio/laravel-consent - 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. aw-studio/laravel-consent

ActiveLibrary

aw-studio/laravel-consent
=========================

v0.4(4y ago)5371MITBladePHP ^8.0

Since Jul 2Pushed 4y ago1 watchersCompare

[ Source](https://github.com/aw-studio/laravel-consent)[ Packagist](https://packagist.org/packages/aw-studio/laravel-consent)[ RSS](/packages/aw-studio-laravel-consent/feed)WikiDiscussions main Synced yesterday

READMEChangelog (4)Dependencies (2)Versions (5)Used By (0)

Laravel Consent
===============

[](#laravel-consent)

This package provides headless blade-components for building consents, e.g. cookie-consents. Consents are being stored in `local-storage`.

Installation
------------

[](#installation)

Install via composer:

```
composer require aw-studio/laravel-consent
```

Components
----------

[](#components)

The Laravel Consent package comes with three blade components: ``, `` and ``.

### Consent Wrapper

[](#consent-wrapper)

The `` component is used to group consents. You can style each wrapper to your liking. Every wrapper needs an unique `id`. Each wrapper component shows the full list of consents and a `Save-Button`. After saving the wrapper is hidden.

```

```

AttributesTypeDescriptionrequiredidStringunique id for grouping consents✅saveStringSave-button text### Consent

[](#consent)

The `` component is used for actually giving a consent and MUST be wrapped by a `` and neeeds a unique `id`. Each consent has a label and and checkbox. The label text is filled with the content of the default slot.

When giving a consent, you may want to execute a local script or load a script from a source.

If you want to load an `external script` after the consent the component should look as follows:

```

    I consent to use google maps.

```

The script will be appended to the ``.

If you want to execute a `local script` you can provide the code in the `` of your ``:

```

    I consent to use google analytics.

        (function (w, d, s, l, i) { console.log('consent a') w[l] = w[l] || [];
        w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js', }); var
        f = d.getElementsByTagName(s)[0], j = d.createElement(s), dl = l !=
        'dataLayer' ? '&l=' + l : ''; j.async = true; j.src =
        'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
        f.parentNode.insertBefore(j, f); })(window, document, 'script',
        'dataLayer', 'GTM-ABCDEFG');

```

AttributesTypeDescriptionrequiredidString✅preselectboolwheter the checkbox should be preselectedsrcboolexternal script src to be loaded after the consent was givencallbackboolcallback to be called after external script was loaded### Consent Toggle

[](#consent-toggle)

Sometimes you may want to provide a 'one-time-consent'. This can be achieved using the `` component. You may place it anywhere in your markup where a corresponding `` exists. A toggle is linked to a consent by providing the same `id` to the toggle. A toggle may be styled to your liking.

The following toggle will fire the callback of the `google-maps` consent:

```

    I consent to using google maps.

```

AttributesTypeDescriptionrequiredidStringid of the consent to toggle✅buttonStringbutton text✅button-classStringclasses to style the buttonFull example
------------

[](#full-example)

In this example, a consent wrapper with to consents is presented:

```

        I consent to use google maps.

        I consent to use google analytics.

            (function (w, d, s, l, i) { console.log('consent a') w[l] = w[l] ||
            []; w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js',
            }); var f = d.getElementsByTagName(s)[0], j = d.createElement(s), dl
            = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src =
            'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
            f.parentNode.insertBefore(j, f); })(window, document, 'script',
            'dataLayer', 'GTM-ABCDEFG');

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~4 days

Total

4

Last Release

1762d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7b2d65d58480dd7fdbf4f4593158cbd0634550ee9210c49957cc48c8a8ccaef6?d=identicon)[jannescb](/maintainers/jannescb)

---

Top Contributors

[![jannescb](https://avatars.githubusercontent.com/u/17292622?v=4)](https://github.com/jannescb "jannescb (13 commits)")

---

Tags

blade-componentsconsentcookie-consentheadlesslaravel

### Embed Badge

![Health badge](/badges/aw-studio-laravel-consent/health.svg)

```
[![Health](https://phpackages.com/badges/aw-studio-laravel-consent/health.svg)](https://phpackages.com/packages/aw-studio-laravel-consent)
```

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
