Download the PHP package barchart/laravel-remember-all without Composer
On this page you can find all versions of the php package barchart/laravel-remember-all. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download barchart/laravel-remember-all
More information about barchart/laravel-remember-all
Files in barchart/laravel-remember-all
Package laravel-remember-all
Short Description A Laravel session driver to remember all devices a user has logged in with.
License MIT
Homepage https://www.barchart.com
Informations about the package laravel-remember-all
Laravel Remember All Devices
Note: This repo has been archived as Laravel supports logging out a single device since Laravel 6.0 via logoutCurrentDevice. More information in the PR here: https://github.com/laravel/framework/pull/29397
Laravel currently only supports the "remember me" feature for one device. When you log in to multiple devices, then log out of one, you will be logged out of all. This solves that by storing the tokens in a separate table.
There is a current proposal to put this into Laravel core, but we needed this now: https://github.com/laravel/ideas/issues/971
Setup
Install via composer:
Migrate the new remember_tokens table:
Update your authentication guard:
Eloquent
For Eloquent, you also need to update your model. Just replace Laravel's default User model with the following:
If you're not extending off of Laravel's base User model and instead extending directly off of Eloquent's Model, replace Laravel's default Authenticatable and AuthenticatableContract with the following: