Laravel logout from all devices
Close the authenticated routes in AuthenticateSession middleware using auth.session key.
Route::middleware(['auth', 'auth.session'])->group(function () {
//routes
});
public function logoutAllDevices(Request $request){
$currentPassword = $request->input('currentpassword');
Auth::logoutOtherDevices($currentPassword);
}
click for more Laravel codes read about laravel authentication