PHPackages                             baileylo/session-user - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. baileylo/session-user

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

baileylo/session-user
=====================

Authenticated User injection for auto resolving IOCs

1.0.0(11y ago)026MITPHP

Since Sep 12Pushed 11y ago1 watchersCompare

[ Source](https://github.com/baileylo/SessionUser)[ Packagist](https://packagist.org/packages/baileylo/session-user)[ RSS](/packages/baileylo-session-user/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

SessionUser
===========

[](#sessionuser)

An easy way to inject the authenticated User into your Controllers.

Installation
------------

[](#installation)

### Step 1: Install the package

[](#step-1-install-the-package)

Add this line to your composer.json

```
"baileylo/session-user": "1.0.0"

```

Or, use the commandline:

```
composer require baileylo/session-user

```

### Step 2: Register the Service Provider(Laravel Specific)

[](#step-2-register-the-service-providerlaravel-specific)

Edit your `app/config/app.php` file and add this line to the providers array:

```
'Portico\SessionUser\LaravelSessionUserProvider'

```

### Step 3: Update your User Object

[](#step-3-update-your-user-object)

Add the following interface to your User model/entity,

```
\Portico\SessionUser\SessionUser

```

So your class may now look like this

```
