PHPackages                             bkc-media/twill-cookie-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. bkc-media/twill-cookie-consent

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bkc-media/twill-cookie-consent
==============================

A cookie twill package

v0.9.3-beta(3y ago)1151MITBladePHP ^8.0

Since Mar 16Pushed 3y agoCompare

[ Source](https://github.com/BKC-Media/twill-cookie-consent)[ Packagist](https://packagist.org/packages/bkc-media/twill-cookie-consent)[ Docs](https://github.com/bkc-media/twill-cookie-consent)[ RSS](/packages/bkc-media-twill-cookie-consent/feed)WikiDiscussions main Synced 1mo ago

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

Cookie consent for Twill
========================

[](#cookie-consent-for-twill)

[![Latest Stable Version](https://camo.githubusercontent.com/ed2e480caa0f4741ed045ebd2c1a209323119ec0dc5c76bd6b064f242fbe1d52/687474703a2f2f706f7365722e707567782e6f72672f626b632d6d656469612f7477696c6c2d636f6f6b69652d636f6e73656e742f76)](https://packagist.org/packages/bkc-media/twill-cookie-consent) [![Total Downloads](https://camo.githubusercontent.com/3af796e95f9ceb95f235cbfb1de3aef21419064874b16445f8d688df4980d14a/687474703a2f2f706f7365722e707567782e6f72672f626b632d6d656469612f7477696c6c2d636f6f6b69652d636f6e73656e742f646f776e6c6f616473)](https://packagist.org/packages/bkc-media/twill-cookie-consent) [![Latest Unstable Version](https://camo.githubusercontent.com/39dc813a8a936f49fd130eec1803da3cd8c11f808c58ae3d54cc229bde904811/687474703a2f2f706f7365722e707567782e6f72672f626b632d6d656469612f7477696c6c2d636f6f6b69652d636f6e73656e742f762f756e737461626c65)](https://packagist.org/packages/bkc-media/twill-cookie-consent) [![License](https://camo.githubusercontent.com/2cf6b3ef20c1d6022db3fd54cd14a407002dc9b0d0dc18de45095b11ca17bb2c/687474703a2f2f706f7365722e707567782e6f72672f626b632d6d656469612f7477696c6c2d636f6f6b69652d636f6e73656e742f6c6963656e7365)](https://packagist.org/packages/bkc-media/twill-cookie-consent)

This package provides a simple way to add cookie consent to your Twill 3x project by adding cookie scripts based on user preferences using the CMS.

Requirements
------------

[](#requirements)

- PHP: ^8.0
- area17/twill: ^3.0
- Laravel: ^8|^9

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

[](#installation)

You can install the package via composer:

```
composer require bkc-media/twill-cookie-consent
```

Publish the assets to include necessary javascript and css files:

```
php artisan vendor:publish --provider="BKCmedia\TwillCookieConsent\TwillCookieConsentServiceProvider" --tag="twill-cookie-consent-assets" --force
```

Optionally publish the config file:

```
php artisan vendor:publish --provider="BKCmedia\TwillCookieConsent\TwillCookieConsentServiceProvider" --tag="twill-cookie-consent-config"
```

Optionally publish the lang files:

```
php artisan vendor:publish --provider="BKCmedia\TwillCookieConsent\TwillCookieConsentServiceProvider" --tag="twill-cookie-consent-translations"
```

The contents of the published config file will look like this:

```
return [
    /*
     * The cookie name in which we store which cookie id's the user has consented to.
     */
    'cookie_name' => 'tcc_cookie_consent',

    /*
     * Set the cookie duration in minutes.  Default is 60 * 24 * 365.
     */
    'cookie_lifetime' => 60 * 24 * 365,

    /*
     * Set primary color for cookie consent accept all buttons, default is green.
     */
    'primary_color' => '#65A30D',
];
```

Run migration to add the twill cookie singleton:

```
php artisan migrate
```

Usage
-----

[](#usage)

After migration you can add the cookie consent content by going to the cookie module in the CMS. Add the cookie consent banner description and intro settings content. Use the block editor to add cookie categories and the repeater inside the block to add cookie information and necessary scripts per location: head, body or footer.

Add the cookie consent banner to your app.blade.php file or any other layout file:

```
@include('twill-cookie-consent::components.cookie-consent')
```

Based on provider scripts add one or all of the following in the right location in your app.blade.php file or any other layout file:

```
@include('twill-cookie-consent::components.head-scripts')

@include('twill-cookie-consent::components.body-scripts')

@include('twill-cookie-consent::components.footer-scripts')
```

Based on the user preferences the scripts will be added to the page in the right location.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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

5

Last Release

1136d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4f9ecc9beb74c9dac89a2c8de6b424dc9fd1f7a6577b78f3d07a695efd8b57fb?d=identicon)[techsev](/maintainers/techsev)

---

Top Contributors

[![jefsev](https://avatars.githubusercontent.com/u/28394100?v=4)](https://github.com/jefsev "jefsev (48 commits)")

---

Tags

cookie-consentgdpr-compliantlaravelphp8twill

### Embed Badge

![Health badge](/badges/bkc-media-twill-cookie-consent/health.svg)

```
[![Health](https://phpackages.com/badges/bkc-media-twill-cookie-consent/health.svg)](https://phpackages.com/packages/bkc-media-twill-cookie-consent)
```

###  Alternatives

[wireui/wireui

TallStack components

1.8k1.3M16](/packages/wireui-wireui)[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21147.4k](/packages/ramonrietdijk-livewire-tables)

PHPackages © 2026

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