Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
vickzkater committed Jul 9, 2020
1 parent 1fccf97 commit 5a50302
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 56 deletions.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,26 @@ chmod o+w -R public/uploads/

## Session Driver Database

If you choose using `database` as Session Driver, then you need make some changes in `Illuminate\Session\DatabaseSessionHandler.php`
When using the `database` session driver, you will need to create a table to contain the session items. Below is an example `Schema` declaration for the table:
```
Schema::create('sessions', function ($table) {
$table->string('id')->unique();
$table->foreignId('user_id')->nullable();
$table->string('ip_address', 45)->nullable();
$table->text('user_agent')->nullable();
$table->text('payload');
$table->integer('last_activity');
});
```

You may use the `session:table` Artisan command to generate this migration:
```
php artisan session:table
php artisan migrate
```

Then you need make some changes in `Illuminate\Session\DatabaseSessionHandler.php`
```
...
protected function addUserInformation(&$payload)
Expand Down
21 changes: 1 addition & 20 deletions VERSION.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,7 @@
## Version 2.0.1
### Changelog
- Add support auth for Guzzle functions
- Add support Session Driver Database by make some changes in `Illuminate\Session\DatabaseSessionHandler.php`
```
...
protected function addUserInformation(&$payload)
{
if ($this->container->bound(Guard::class)) {
$payload['user_id'] = $this->userId();
}
// ADDED FOR LARA-S-CMS BY KINIDI TECH - BEGIN
if(\Session::has('admin')){
$larascms_user = \Session::get('admin');
$payload['user_id'] = $larascms_user->id;
}
// ADDED FOR LARA-S-CMS BY KINIDI TECH - END
return $this;
}
...
```
- Add support Session Driver Database
- Add security update: if password has been changed, then force user to re-login
- Add feature logout from all sessions

Expand Down
35 changes: 0 additions & 35 deletions database/migrations/2020_07_08_211522_create_sessions_table.php

This file was deleted.

0 comments on commit 5a50302

Please sign in to comment.