{"id":19458869,"url":"https://github.com/leafsphp/cookie","last_synced_at":"2025-09-18T00:05:00.857Z","repository":{"id":57013256,"uuid":"408107431","full_name":"leafsphp/cookie","owner":"leafsphp","description":"🍪 Leaf PHP cookie module","archived":false,"fork":false,"pushed_at":"2025-03-07T16:04:42.000Z","size":13,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-18T00:04:34.896Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://leafphp.dev/modules/cookies/","language":"PHP","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/leafsphp.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},"funding":{"open_collective":"leaf","github":"leafsphp"}},"created_at":"2021-09-19T11:22:58.000Z","updated_at":"2025-03-06T09:49:43.000Z","dependencies_parsed_at":"2025-04-30T18:39:45.951Z","dependency_job_id":null,"html_url":"https://github.com/leafsphp/cookie","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/leafsphp/cookie","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafsphp%2Fcookie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafsphp%2Fcookie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafsphp%2Fcookie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafsphp%2Fcookie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leafsphp","download_url":"https://codeload.github.com/leafsphp/cookie/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafsphp%2Fcookie/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275685793,"owners_count":25509539,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-17T02:00:09.119Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2024-11-10T17:28:48.978Z","updated_at":"2025-09-18T00:05:00.798Z","avatar_url":"https://github.com/leafsphp.png","language":"PHP","readme":"\u003c!-- markdownlint-disable no-inline-html --\u003e\n\u003cp align=\"center\"\u003e\n  \u003cbr\u003e\u003cbr\u003e\n  \u003cimg src=\"https://leafphp.netlify.app/assets/img/leaf3-logo.png\" height=\"100\"/\u003e\n  \u003ch1 align=\"center\"\u003eLeaf Cookie Module\u003c/h1\u003e\n  \u003cbr\u003e\u003cbr\u003e\n\u003c/p\u003e\n\n[![Latest Stable Version](https://poser.pugx.org/leafs/cookie/v/stable)](https://packagist.org/packages/leafs/cookie)\n[![Total Downloads](https://poser.pugx.org/leafs/cookie/downloads)](https://packagist.org/packages/leafs/cookie)\n[![License](https://poser.pugx.org/leafs/cookie/license)](https://packagist.org/packages/leafs/cookie)\n\nLeaf's cookie module provides a wrapper around the built-in PHP cookie functions. It provides a cleaner and more expressive API working with cookies while maintaining full compatibility with PHP's built-in cookie functions.\n\n## Installation\n\nYou can easily install Leaf using [Composer](https://getcomposer.org/).\n\n```bash\ncomposer require leafs/cookie\n```\n\n## Usage\n\nOnce installed, it merges with Leaf's core, so you can use it like so:\n\n```php\nresponse()\n  -\u003ewithCookie('name', 'Fullname')\n  -\u003ewithCookie('age', 20)\n  -\u003ejson([\n      'message' =\u003e 'Cookies set'\n    ]);\n```\n\nOr on its own:\n\n```php\ncookie()-\u003eset('name', 'Fullname', [\n  'expire' =\u003e time() + 3600,\n  'path' =\u003e '/',\n  'domain' =\u003e 'example.com',\n  'secure' =\u003e true,\n  'httponly' =\u003e true,\n  'samesite' =\u003e 'None'\n]);\n```\n\n## Stay In Touch\n\n- [Twitter](https://twitter.com/leafphp)\n- [Join the forum](https://github.com/leafsphp/leaf/discussions/37)\n- [Chat on discord](https://discord.com/invite/Pkrm9NJPE3)\n\n## Learning Leaf PHP\n\n- Leaf has a very easy to understand [documentation](https://leafphp.dev) which contains information on all operations in Leaf.\n- You can also check out our [youtube channel](https://www.youtube.com/channel/UCllE-GsYy10RkxBUK0HIffw) which has video tutorials on different topics\n- You can also learn from [codelabs](https://leafphp.dev/codelabs/) and contribute as well.\n\n## Contributing\n\nWe are glad to have you. All contributions are welcome! To get started, familiarize yourself with our [contribution guide](https://leafphp.dev/community/contributing.html) and you'll be ready to make your first pull request 🚀.\n\nTo report a security vulnerability, you can reach out to [@mychidarko](https://twitter.com/mychidarko) or [@leafphp](https://twitter.com/leafphp) on twitter. We will coordinate the fix and eventually commit the solution in this project.\n\n## Sponsoring Leaf\n\nWe are committed to keeping Leaf open-source and free, but maintaining and developing new features now requires significant time and resources. As the project has grown, so have the costs, which have been mostly covered by the team. To sustain and grow Leaf, we need your help to support full-time maintainers.\n\nYou can sponsor Leaf and any of our packages on [open collective](https://opencollective.com/leaf) or check the [contribution page](https://leafphp.dev/support/) for a list of ways to contribute.\n\nAnd to all our [existing cash/code contributors](https://leafphp.dev#sponsors), we love you all ❤️\n","funding_links":["https://opencollective.com/leaf","https://github.com/sponsors/leafsphp"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleafsphp%2Fcookie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleafsphp%2Fcookie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleafsphp%2Fcookie/lists"}