0

I am attempting to update my application so that sessions are handled via the database instead of flat files, so that I can track which users are currently logged in and in order to do so have been using the following resources to help:

Get All Connected Users (Laravel 5)

https://gist.github.com/brunogaspar/494903b3dd16321a12d1

https://laravel.com/docs/5.0/session#configuration

However for some reason, despite following each step I just get the following error:

ErrorException in Manager.php line 139:

call_user_func_array() expects parameter 1 to be a valid callback, class 'Illuminate\Session\Store' does not have a method 'updateCurrent'

Can anybody please explain to me what I'm doing wrong?

Thanks for any help in advance!

2 Answers 2

1

In your examples you need to create Session Model and include it with use directive:

use App\Session;

Then you can call Session::updateCurrent(); as described.

Sign up to request clarification or add additional context in comments.

1 Comment

Hey thanks, yeah I see, my main problem is that I need to install Sentinel, unfortuantly im having issues with that also right now. I keep getting: PHP Fatal error: Class 'Cartalyst\Sentinel\src\Laravel\SentinelServiceProvider::class' not found despite the file existing, im quite confused
0

So i believe I've figured it out, I needed to install sentinel first, which I've done and I no longer get the errors, however I still see no sessions being stored in the database :(

Regards,

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.