PHPackages                             dev-moez/auth-last-activity - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. dev-moez/auth-last-activity

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

dev-moez/auth-last-activity
===========================

A package to record user last activity for multi guard applications

v1(3y ago)0100MITPHPPHP ^8.1

Since Mar 14Pushed 3y ago1 watchersCompare

[ Source](https://github.com/dev-moez/auth-last-activity)[ Packagist](https://packagist.org/packages/dev-moez/auth-last-activity)[ RSS](/packages/dev-moez-auth-last-activity/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

[![](https://raw.githubusercontent.com/dev-moez/auth-last-activity/main/assets/icons/icon.png)](https://raw.githubusercontent.com/dev-moez/auth-last-activity/main/assets/icons/icon.png)

Auth Last Activity
==================

[](#auth-last-activity)

####  👱 🕑 Multi-auth last activity laravel package

[](#-----multi-auth-last-activity-laravel-package-)

Table of contents
-----------------

[](#table-of-contents)

- [📖 Introduction](#introduction)
- [✨ Features](#features)
- [🧰 Installation](#installation)
- [⚙️ Configuration](#configuration)
- [🚀 Usage](#usage)
    - [Getting user's last activity](#getting-a-user-last-activity)
    - [Getting a user status](#getting-a-user-status)
    - [Getting online users](#getting-online-users)
    - [Getting offline users](#getting-offline-users)
    - [Getting online users with period](#getting-online-users-with-period)
    - [Getting user online status using `cache`](#getting-user-online-status-using-cache)

📖 Introduction
--------------

[](#book-introduction)

AuthLastActivity is a Laravel package that supports multiple authentication guards to record the last activity for your application users.

✨ Features
----------

[](#sparkles-features)

- Supports multiple authentication guards
- Adjustable database connection
- Ability to set seconds for the status of online users

🧰 Installation
--------------

[](#toolbox-installation)

You can install the package via composer:

```
composer require dev-moez/auth-last-activity

```

The package will automatically register itself.

And to publish the config and the migration files needed for the package, run the following artisan command:

```
php artisan auth-last-activity:install

```

Or Manually:

You can publish the config file using the following command:

```
php artisan vendor:publish --tag="auth-last-activity-config"

```

This is the contents of the published config file:

```
