Skip to content

Commit

Permalink
Updating session function to use configured table (#103)
Browse files Browse the repository at this point in the history
* Simple typofix (#92)

* Update to Laravel Fortify 1.0 (#96)

* [ FIX_ROUTE_PUBLISH ] add missing extension (#97)

* Revert "[ FIX_ROUTE_PUBLISH ] add missing extension (#97)" (#98)

This reverts commit 92afec5.

* Updating session function to use configured table

The table is currently hardcoded, this change has the function use the table name configured in session.php

Co-authored-by: JT Smith <[email protected]>
Co-authored-by: Youri Wijnands <[email protected]>
Co-authored-by: Arnor D'Haenens <[email protected]>
Co-authored-by: Taylor Otwell <[email protected]>
  • Loading branch information
5 people committed Sep 9, 2020
1 parent 47ad018 commit 1712837
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ Jetstream::role('editor', 'Editor', [
<a name="team-authorization"></a>
### Authorization

A user's team permissions may be determine using the `hasTeamPermission` method available via the `Laravel\Jetstream\HasTeams` trait:
A user's team permissions may be determined using the `hasTeamPermission` method available via the `Laravel\Jetstream\HasTeams` trait:

```php
if ($request->user()->hasTeamPermission($team, 'read')) {
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
"ext-json": "*",
"illuminate/support": "^8.0",
"jenssegers/agent": "^2.6",
"laravel/fortify": "^0.0.1"
"laravel/fortify": "^1.0"
},
"require-dev": {
"inertiajs/inertia-laravel": "^0.2.4",
"laravel/sanctum": "^2.6",
"mockery/mockery": "^1.0",
"orchestra/testbench": "^6.0",
"phpunit/phpunit": "^8.0"
"phpunit/phpunit": "^9.3"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Controllers/Inertia/UserProfileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function sessions(Request $request)
}

return collect(
DB::table('sessions')
DB::table(config('session.table'))
->where('user_id', $request->user()->getKey())
->orderBy('last_activity', 'desc')
->get()
Expand Down

0 comments on commit 1712837

Please sign in to comment.