{"id":23003718,"url":"https://github.com/stechstudio/laravel-raw-sessions","last_synced_at":"2025-08-14T01:32:12.619Z","repository":{"id":20829743,"uuid":"24115703","full_name":"stechstudio/laravel-raw-sessions","owner":"stechstudio","description":"Laravel session driver to establish bridge with raw PHP $_SESSION","archived":false,"fork":false,"pushed_at":"2022-11-15T16:26:38.000Z","size":9,"stargazers_count":18,"open_issues_count":0,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-11-18T09:58:38.029Z","etag":null,"topics":["laravel","sessions"],"latest_commit_sha":null,"homepage":"","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/stechstudio.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}},"created_at":"2014-09-16T20:04:04.000Z","updated_at":"2024-03-26T17:08:27.000Z","dependencies_parsed_at":"2023-01-13T21:10:13.367Z","dependency_job_id":null,"html_url":"https://github.com/stechstudio/laravel-raw-sessions","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stechstudio%2Flaravel-raw-sessions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stechstudio%2Flaravel-raw-sessions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stechstudio%2Flaravel-raw-sessions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stechstudio%2Flaravel-raw-sessions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stechstudio","download_url":"https://codeload.github.com/stechstudio/laravel-raw-sessions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229790943,"owners_count":18124608,"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","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":["laravel","sessions"],"created_at":"2024-12-15T07:15:08.608Z","updated_at":"2024-12-15T07:15:09.286Z","avatar_url":"https://github.com/stechstudio.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Raw PHP session handler for Laravel\n====================\n\nAs of version 4.1.0 Laravel has removed the native session handler, and made it simply an alias for their file handler.\n\nhttp://wiki.laravel.io/Changelog_(Laravel_4)#Version_4.1.0\n\nThis handler gives that back.\n\nWhy would you want this?\n====================\n\nReally you shouldn't want this. Laravel's own session management has some very cool advantages, and you should really use it. \n\nExcept when you can't.\n\nSometimes you may have a separate non-Laravel PHP app running on the same domain, that needs full session sharing. In our case, it was a legacy app that was being refactored in Laravel, but needed complete session sharing in the meantime.\n\nSetup\n====================\n\nFirst off add the composer dependency:\n\n    \"require\": {\n        \"stechstudio/laravel-raw-sessions\" : \"0.1.*\"\n\nThen of course update composer:\n\n    composer update\n\nNow add the service provider to the array in `config/app.php`:\n\n    'providers' =\u003e array(\n        ...\n        'STS\\Session\\LaravelRawSessionServiceProvider',\n\nIn `config/session.php` set the `driver` to `raw`:\n\n    'driver' =\u003e 'raw',\n    \nAnd finally, make sure in that same file you turn off encryption. The only way we can have PHP manage the session is to tell Laravel not to encrypt it.\n\n    'encrypt' =\u003e false,\n\nThat's it! All your Laravel `Session` calls will be reading and writing to the raw `$_SESSION` array.\n\nNamespace the session\n====================\n\nYou may wish to avoid polluting the root `$_SESSION` array, if you are sharing the session with other apps.\n\nTo change this, specify a `namespace` param in `config/session.php`:\n\n    'driver' =\u003e 'raw',\n    'namespace' =\u003e 'mynamespace',\n\nThis will cause Laravel to store all its session data under `$_SESSION['mynamespace']`. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstechstudio%2Flaravel-raw-sessions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstechstudio%2Flaravel-raw-sessions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstechstudio%2Flaravel-raw-sessions/lists"}