{"id":28676493,"url":"https://github.com/code16/cookie-consent-js","last_synced_at":"2026-02-19T12:01:38.722Z","repository":{"id":56954789,"uuid":"448884449","full_name":"code16/cookie-consent-js","owner":"code16","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-10T09:44:48.000Z","size":266,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-26T22:06:56.902Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Blade","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/code16.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-01-17T12:27:18.000Z","updated_at":"2025-03-10T09:44:32.000Z","dependencies_parsed_at":"2025-10-15T10:45:06.853Z","dependency_job_id":"46903f1b-edf8-48ca-a256-b6edac82134d","html_url":"https://github.com/code16/cookie-consent-js","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/code16/cookie-consent-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code16%2Fcookie-consent-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code16%2Fcookie-consent-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code16%2Fcookie-consent-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code16%2Fcookie-consent-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/code16","download_url":"https://codeload.github.com/code16/cookie-consent-js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code16%2Fcookie-consent-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29612508,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T10:52:55.328Z","status":"ssl_error","status_checked_at":"2026-02-19T10:52:26.323Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-13T23:04:49.729Z","updated_at":"2026-02-19T12:01:38.700Z","avatar_url":"https://github.com/code16.png","language":"Blade","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cookie consent\n\n## Setup\n```bash\ncomposer require code16/cookie-consent-js\n```\n\n**Required**: publish assets (add this in composer.json `post-autoload-dump` scripts)\n```php\nphp artisan vendor:publish --provider='Code16\\CookieConsent\\CookieConsentServiceProvider' --tag=assets --force\n```\n\nYou may publish the config file:\n\n```php\nphp artisan vendor:publish --provider=\"Code16\\CookieConsent\\CookieConsentServiceProvider\" --tag=config\n```\n\nAnd the lang file:\n\n```php\nphp artisan vendor:publish --provider=\"Code16\\CookieConsent\\CookieConsentServiceProvider\" --tag=lang\n```\n\n## Usage\n\nIn your blade layout\n```blade\n\u003chead\u003e\n    {{-- ... --}}\n    \u003cx-cookie-consent::scripts /\u003e\n    \u003cx-cookies-allowed category=\"analytics\"\u003e\n        \u003cscript\u003e\n          {{-- some injected cookies --}}\n        \u003c/script\u003e\n    \u003c/x-cookies-allowed\u003e\n\u003c/head\u003e\n```\n\nAlso you must declare the cookie category in `config/cookie-consent.php` as follow\n```php\n[\n    'categories' =\u003e [\n        'system' =\u003e [\n            'required' =\u003e true,\n            'services' =\u003e [\n                [\n                  'cookies' =\u003e []\n                ]\n            ]\n        ],\n        'analytics' =\u003e [\n            'services' =\u003e [\n                'google-analytics' =\u003e [\n                    'cookies' =\u003e [\n                        ['name' =\u003e '_ga', 'lifetime' =\u003e '2 years']\n                    ]\n                ]\n            ]\n        ],\n    ]\n];\n```\n\nCategories marked as `required` are cannot be opt-out by the user.\n\nTo provide explanation texts in the manage dialog, add content to the lang file:\n```php\n[\n    'manage_modal' =\u003e [\n        'title' =\u003e 'Manage cookies',\n        'description' =\u003e 'About cookies...',\n        'categories' =\u003e [\n            'system' =\u003e [\n                'title' =\u003e 'System cookies',\n                'description' =\u003e \"Description text about system cookies\",\n            ],\n            'analytics' =\u003e [\n                'title' =\u003e 'Analytics cookies',\n                'description' =\u003e \"Description text about analytics cookies\",\n            ],\n        ],\n    ]\n];\n```\n\n### Show the manage modal from a link (e.g. cookies page)\nIn the page:\n```blade\n   \u003ca href=\"#manage-cookies\"\u003eOpen manage cookies modal\u003c/a\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode16%2Fcookie-consent-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode16%2Fcookie-consent-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode16%2Fcookie-consent-js/lists"}