PHPackages                             fatkulnurk/cookies - 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. fatkulnurk/cookies

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

fatkulnurk/cookies
==================

PHP library for handling sessions

v1.0(6y ago)11PHPPHP ^7.2

Since Mar 27Pushed 6y ago1 watchersCompare

[ Source](https://github.com/fatkulnurk/cookies)[ Packagist](https://packagist.org/packages/fatkulnurk/cookies)[ RSS](/packages/fatkulnurk-cookies/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)DependenciesVersions (3)Used By (0)

PHP COOKIE
==========

[](#php-cookie)

---

PHP library for handling cookies

### Install

[](#install)

See in packagist

```
https://packagist.org/packages/fatkulnurk/cookies

```

with composer

```
composer require fatkulnurk/cookies

```

### Usage

[](#usage)

**Custom cookie with options:**

calling all methods is not needed, just use as necessary and end by calling the save () method;

```
(new Cookie('name'))

    // string|null the domain that the cookie will be valid for (including subdomains) or `null` for the current host (excluding subdomains)
    ->setDomain('example.com')

    //  bool indicates that the cookie should be accessible through the HTTP protocol only and not through scripting languages
    ->setHttpOnly(true)

    //int the Unix timestamp indicating the time that the cookie will expire at, i.e. usually `time() + $seconds`
    ->setExpiryTime(time() + 360000) // or ->setMaxAge(36000) without time()

    // @var string the path on the server that the cookie will be valid for (including all sub-directories), e.g. an empty string for the current directory or `/` for the root directory */
    ->setPath('/')

    // bool indicates that the cookie should be sent back by the client over secure HTTPS connections only
    ->setSecureOnly(false)

    // mixed|null the value of the cookie that will be stored on the client's machine
    ->setValue('fatkul nur koirudin')

    // save
    ->save();

```

**Add value to a cookie:**

```
Cookie::set('name', 'Fatkul Nur Koirudin');

// same with

Cookie::setCookie('name', 'Fatkul Nur Koirudin');

```

**Return the cookies value by key:**

```
Cookie::get('keyname');

```

**Destroys Cookie:**

by default cookie can't destroy, cookie will be change to empty value.

```
Cookie::destroy('name')

// same with

Cookie::set('name', '');

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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 ~0 days

Total

2

Last Release

2237d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f01b15f535a737f1952358e3ee9789281cf3208d57039eda0782ef8900c72326?d=identicon)[fatkulnurk](/maintainers/fatkulnurk)

---

Top Contributors

[![fatkulnurk](https://avatars.githubusercontent.com/u/12779618?v=4)](https://github.com/fatkulnurk "fatkulnurk (2 commits)")

### Embed Badge

![Health badge](/badges/fatkulnurk-cookies/health.svg)

```
[![Health](https://phpackages.com/badges/fatkulnurk-cookies/health.svg)](https://phpackages.com/packages/fatkulnurk-cookies)
```

###  Alternatives

[laravel-frontend-presets/tailwindcss

Laravel frontend preset for Tailwind CSS

1.1k405.6k6](/packages/laravel-frontend-presets-tailwindcss)[topthink/think-worker

workerman extend for thinkphp

202227.2k9](/packages/topthink-think-worker)[kartik-v/yii2-field-range

Easily manage Yii 2 ActiveField ranges (from/to) with Bootstrap 3 addons markup and more

232.1M26](/packages/kartik-v-yii2-field-range)[nullref/yii2-datatables

Yii2 Extension for DataTables jQuery plug-in

7290.3k](/packages/nullref-yii2-datatables)[los/basepath

PHP middleware to remove a path prefix from request uri

14132.4k](/packages/los-basepath)[tdwesten/statamic-builder

A fluent blueprint and fieldset builder for Statamic.

3610.3k1](/packages/tdwesten-statamic-builder)

PHPackages © 2026

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