{"id":26085257,"url":"https://github.com/codezero-be/session","last_synced_at":"2026-04-22T04:33:49.491Z","repository":{"id":29554323,"uuid":"33093525","full_name":"codezero-be/session","owner":"codezero-be","description":"Manage session data","archived":false,"fork":false,"pushed_at":"2015-03-29T23:57:31.000Z","size":128,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-12-19T12:27:50.616Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codezero-be.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-29T23:19:05.000Z","updated_at":"2015-03-29T23:53:49.000Z","dependencies_parsed_at":"2022-08-31T00:50:36.797Z","dependency_job_id":null,"html_url":"https://github.com/codezero-be/session","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/codezero-be/session","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codezero-be%2Fsession","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codezero-be%2Fsession/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codezero-be%2Fsession/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codezero-be%2Fsession/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codezero-be","download_url":"https://codeload.github.com/codezero-be/session/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codezero-be%2Fsession/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32121023,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T00:31:26.853Z","status":"online","status_checked_at":"2026-04-22T02:00:05.693Z","response_time":58,"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":"2025-03-09T05:58:01.072Z","updated_at":"2026-04-22T04:33:49.474Z","avatar_url":"https://github.com/codezero-be.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Session\n\n[![GitHub release](https://img.shields.io/github/release/codezero-be/session.svg)]()\n[![License](https://img.shields.io/packagist/l/codezero/session.svg)]()\n[![Build Status](https://img.shields.io/travis/codezero-be/session.svg?branch=master)](https://travis-ci.org/codezero-be/session)\n[![Scrutinizer](https://img.shields.io/scrutinizer/g/codezero-be/session.svg)](https://scrutinizer-ci.com/g/codezero-be/session)\n[![Total Downloads](https://img.shields.io/packagist/dt/codezero/session.svg)](https://packagist.org/packages/codezero/session)\n\n### Manage session data.\n\nThis package includes an adapter for Laravel's [`Session Store`](http://laravel.com/docs/5.0/session), to enable the use of other implementations in non-Laravel projects.\n\n## Installation\n\nInstall this package through Composer:\n\n    composer require codezero/session\n\n## Vanilla PHP Implementation\n\nAutoload the vendor classes:\n\n    require_once 'vendor/autoload.php'; // Path may vary\n\nAnd then use the `VanillaSession` implementation:\n\n    $session = new \\CodeZero\\Session\\VanillaSession();\n\n## Laravel 5 Implementation\n\nAdd a reference to `LaravelSessionServiceProvider` to the providers array in `config/app.php`:\n\n    'providers' =\u003e [\n        'CodeZero\\Session\\LaravelSessionServiceProvider'\n    ]\n\nThen you can \"make\" (or inject) a `Cookie` instance anywhere in your app:\n\n    $session = \\App::make('CodeZero\\Session\\Session');\n\n\u003e **TIP:** Laravel's [IoC container](http://laravel.com/docs/5.0/container) will automatically provide the Laravel specific `Session` implementation. This will use Laravel's [`Session`](http://laravel.com/docs/5.0/session) goodness behind the scenes!\n\n## Usage\n\n### Store data in the session\n\n    $session-\u003estore('key', 'value');\n    $session-\u003estore('key', ['array' =\u003e 'value']);\n\n### Get session data\n\nIf a key doesn't exist, `null` will be returned.\n\n\n    $array = $session-\u003eget(); // An array of all data\n    $value = $session-\u003eget('key'); // Specific data\n\n### Delete session data\n\n    $session-\u003eflush(); // Clear all data\n    $session-\u003edelete('key'); // Clear specific data\n\n### Destroy the session\n\nThis will flush all data and regenerate the session ID.\n\n    $session-\u003edestroy();\n \n## Testing\n\n    $ vendor/bin/phpspec run\n\n## Security\n\nIf you discover any security related issues, please [e-mail me](mailto:ivan@codezero.be) instead of using the issue tracker.\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n---\n[![Analytics](https://ga-beacon.appspot.com/UA-58876018-1/codezero-be/session)](https://github.com/igrigorik/ga-beacon)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodezero-be%2Fsession","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodezero-be%2Fsession","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodezero-be%2Fsession/lists"}