Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/geggleto/psr7-session

Middleware to expose your SESSION stuff to Requests
https://github.com/geggleto/psr7-session

Last synced: 5 days ago
JSON representation

Middleware to expose your SESSION stuff to Requests

Awesome Lists containing this project

README

        

## Session Middleware

This middleware injects your middleware contents into the Request Object.

## Usage

```php
$app->add(new \Geggleto\Middleware\Session('session_name'));
```

## Example
```php
//In your Session you have
[
'user' => 1
]

//Then in your Request Object, if you want your User ID...

$request->getAttribute('user') === 1

```