Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/attla/cookier
🍪 Powerful wrapper for improved cookie integration on Laravel
https://github.com/attla/cookier
cookie laravel laravel-package
Last synced: about 2 months ago
JSON representation
🍪 Powerful wrapper for improved cookie integration on Laravel
- Host: GitHub
- URL: https://github.com/attla/cookier
- Owner: attla
- License: mit
- Created: 2022-07-12T05:26:35.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-18T01:26:52.000Z (over 2 years ago)
- Last Synced: 2024-05-04T23:03:28.897Z (8 months ago)
- Topics: cookie, laravel, laravel-package
- Language: PHP
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cookier
🍪 Powerful wrapper for improved cookie integration on Laravel.
## Installation
```bash
composer require attla/cookier
```## Usage
This wrapper use same functionality as the Laravel cookie facade but a little incremented.
```php
// on setting a cookie you can retrieve the cookie while set it
$httpCookie = \Cookier::set('user', 'nicolau');// retrieve the cookie from request
$user = \Cookier::get('user', 'default');// forget a cookie
\Cookier::forget('user');// check if the cookie has queued
\Cookier::hasQueued('user');// getting many cookies
$cookies = \Cookier::getMany([
'user' => 'default',
'password',
]);```
All methods available on laravel cookie facade can be used.
## License
This package is licensed under the [MIT license](LICENSE) © [Octha](https://octha.com).