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)018MITPHPPHP ^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 today

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

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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

1336d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1775052?v=4)[hirenreshamwala](/maintainers/hirenreshamwala)[@hirenreshamwala](https://github.com/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

[kartik-v/yii2-password

Useful password strength validation utilities for Yii Framework 2.0

761.3M17](/packages/kartik-v-yii2-password)[vitalybaev/laravel5-dkim

Laravel 5/6 package for signing outgoing messages with DKIM.

3163.1k](/packages/vitalybaev-laravel5-dkim)

PHPackages © 2026

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