PHPackages                             xt/laravel-login-history - 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. xt/laravel-login-history

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

xt/laravel-login-history
========================

store login history of user

v1.0.4(3y ago)017MITPHPPHP ^7.4|^8.0

Since Oct 30Pushed 3y ago1 watchersCompare

[ Source](https://github.com/hirenreshamwala/laravel-login-history)[ Packagist](https://packagist.org/packages/xt/laravel-login-history)[ Docs](https://github.com/hirenreshamwala/laravel-login-history)[ RSS](/packages/xt-laravel-login-history/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (2)Versions (6)Used By (0)

Laravel Login History
=====================

[](#laravel-login-history)

[![Latest Version on Packagist](https://camo.githubusercontent.com/93c9ab91887a0c702fc05eaec586caabc4fc2cae071bf3a360bea155cfc3a879/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f78742f6c61726176656c2d6c6f67696e2d686973746f72792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/xt/laravel-login-history)[![Total Downloads](https://camo.githubusercontent.com/935cd5429b9ce2bc64e07af2e717f57678be4b1b55e4a486184755c4f3a050e8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f78742f6c61726176656c2d6c6f67696e2d686973746f72792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/xt/laravel-login-history)

Store login history of user (ip, region, country, user agent).

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require xt/laravel-login-history
```

Run Migrations
--------------

[](#run-migrations)

Publish the migrations with this artisan command:

```
php artisan vendor:publish --tag=laravel-login-history-migrations
```

Configuration
-------------

[](#configuration)

You can publish the config file with this artisan command:

```
php artisan vendor:publish --tag=laravel-login-history-config
```

Usage
-----

[](#usage)

```
use Xt\LoginHistory\Traits\HasLoginHistory;

class User extends Model
{
    use HasLoginHistory;
}
```

After successful login
----------------------

[](#after-successful-login)

Call following function after user login successfully

```
use \Illuminate\Support\Facades\Auth;

Auth::user()->addLoginHistory();
```

IpInfo API token
----------------

[](#ipinfo-api-token)

get api token from [ipinfo.io](https://ipinfo.io/) and add it to your .env file

```
IPINFO_API_TOKEN=xxxxxx

```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Hiren Reshamwala](https://github.com/hirenreshamwala)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

5

Last Release

1283d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5c3a9aec52ca2e39b71f5a3aaacec11c7352fa97bb52b04293198e1831982740?d=identicon)[hirenreshamwala](/maintainers/hirenreshamwala)

---

Top Contributors

[![hirenreshamwala](https://avatars.githubusercontent.com/u/1775052?v=4)](https://github.com/hirenreshamwala "hirenreshamwala (8 commits)")

---

Tags

xtlogin-history

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/xt-laravel-login-history/health.svg)

```
[![Health](https://phpackages.com/badges/xt-laravel-login-history/health.svg)](https://phpackages.com/packages/xt-laravel-login-history)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
