Download the PHP package areia-lab/laravel-login-notifier without Composer
On this page you can find all versions of the php package areia-lab/laravel-login-notifier. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download areia-lab/laravel-login-notifier
More information about areia-lab/laravel-login-notifier
Files in areia-lab/laravel-login-notifier
Package laravel-login-notifier
Short Description Laravel package to notify users of logins from new devices or IP addresses for enhanced security.
License MIT
Informations about the package laravel-login-notifier
Laravel Login Notifier
Package: areia-lab/laravel-login-notifier
A Laravel package to monitor user logins, detect new devices or IP addresses, log device and location information, and notify users and admins of suspicious or new login activity.
Features
- Detect logins from new devices or IP addresses.
- Send email notifications to users on new logins.
- Send alerts to admin for every login.
- Log device, browser, platform, IP, and geo-location.
- Fully configurable via a config file.
- Supports queueable notifications for production.
Requirements
This package requires the following:
- PHP
^8.1 - Laravel
^10.0 - jenssegers/agent
^2.6– device & browser detection - stevebauman/location
^7.0– IP geolocation lookup
Installation
Publish the configuration and migration files:
The migrations will create the
login_historiestable to store login data.
Configuration
Edit the published config file config/login-notifier.php:
Usage
This package works automatically on every login. You don’t need to call anything manually.
The following happens automatically:
- Login is recorded in
login_histories. - New device/IP detection is performed.
- User notification is sent if enabled.
- Admin notification is sent if enabled.
Access Login Histories (Facade)
The package provides a facade for querying login histories:
Notifications
UserLoginAlert
- Sent to users on login from a new device or IP.
- Includes: IP, device, browser, platform, location, timestamp.
- Includes a call-to-action button to secure the account.
AdminLoginAlert
- Sent to admin on every login.
- Includes user login details: IP, device, browser, location, timestamp.
- Provides a link to review user activity in the admin dashboard.
Contributing
Contributions, issues, and feature requests are welcome!
- Fork the repo.
- Create a feature branch.
- Submit a Pull Request.
License
MIT License. See LICENSE for details.
All versions of laravel-login-notifier with dependencies
illuminate/support Version ^10.0|^11.0|^12.0
jenssegers/agent Version ^2.6
stevebauman/location Version ^7.0