Download the PHP package proai/laravel-footprint without Composer

On this page you can find all versions of the php package proai/laravel-footprint. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-footprint

Laravel Footprint

Laravel Footprint is a session tracking package for Laravel. It extends Laravel's authentication guard to persist user sessions in the database, giving you full visibility and control over active sessions across devices.

Why use this package?

Laravel's database session driver lets you query the sessions table to list active sessions and delete rows to log out devices. However, this approach breaks down with "remember me" functionality:

Laravel Footprint solves these problems by storing per-device remember tokens in a dedicated user_sessions table, decoupled from Laravel's session store:

On top of that, the package tracks all active sessions per user with IP address, user agent, and last activity — built on top of Laravel's session guard with a configurable refresh interval and an Artisan command for pruning expired sessions.

Requirements

Installation

Publish the configuration and migration files:

Run the migration:

Setup

User Model

Add the HasSessions contract and trait to your user model:

Authentication Guard

Set the guard driver to footprint in config/auth.php:

Middleware

Register the middleware in your application. TrackSession updates the session's last activity timestamp. AuthenticateSession validates session integrity and detects password changes.

Usage

Authentication

The footprint guard implements Laravel's StatefulGuard interface, so authentication works as usual:

Session Management

Access the current session or list all sessions for a user:

Logging Out Devices

Log out a specific device:

Log out all other devices except the current one. Optionally pass the user's password to rehash it:

Pruning Expired Sessions

Remove expired sessions from the database:

You can schedule this command to run periodically:

Configuration

The published config file (config/footprint.php) provides the following options:

Option Default Description
session_model UserSession::class Eloquent model used for session records
remember_duration 43200 (30 days) How long a remember me token stays valid (in minutes)
rotate_on_login true Regenerate remember token each time it is used
logout_all_devices true Whether logout() logs out all devices or only the current one
refresh_interval 5 Minutes between session activity updates
expired_session_retention 1440 (24 hours) How long expired sessions are kept before pruning

Custom Session Model

You can extend the default UserSession model by implementing the Sessionable contract:

Then update the config:

License

This package is released under the MIT License.


All versions of laravel-footprint with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/auth Version ^12.0||^13.0
illuminate/contracts Version ^12.0||^13.0
illuminate/database Version ^12.0||^13.0
illuminate/support Version ^12.0||^13.0
symfony/http-foundation Version ^7.0||^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package proai/laravel-footprint contains the following files

Loading the files please wait ...