Skip to content

Login Audit

This page is generated from public package documentation in capell-4/packages and the package manifest checked into the source repository.

FieldValue
Composer packagecapell-app/login-audit
Package sluglogin-audit
Product groupCapell Operations
Tierpremium
Bundleoperations
Runtime contextsadmin
Capell version^4.0
Source repositorycapell-app/packages
Source pathpackages/login-audit
Docs sourcepackages/login-audit/docs
Manifestcapell.json

Login Audit records Capell user access history. It wraps Rappasoft’s authentication log package with Capell settings, a Filament resource, a dashboard widget, user-resource bridge fields, and IP retention controls.

  • Package: capell-app/login-audit
  • Namespace: Capell\LoginAudit\
  • Surfaces: Filament admin, database
  • Service providers: packages/login-audit/src/Providers/AdminServiceProvider.php, packages/login-audit/src/Providers/LoginAuditServiceProvider.php
  • Capell dependencies: capell-app/admin
  • Third-party dependencies: rappasoft/laravel-authentication-log, tapp/filament-authentication-log
  • Records login, failed login, logout, and admin/user metadata so operators can investigate account activity from Capell.
  • Helps owners spot authentication patterns without adding a bespoke security report to each project.
  • Pairs with password policy and diagnostics to make account safety visible as an operational workflow.

Login Audit records login, failed login, logout, and last-activity metadata for Capell users.

  • Filament resource for authentication logs.
  • Dashboard widget for recent access activity.
  • Settings schema for retention, IP tracking, resource visibility, and user-resource bridge fields.
  • Persistent admin middleware and frontend middleware alias for activity tracking.
  • User edit sidebar summary and relation manager when the bridge is enabled.

For developers: The package keeps vendor logging in place but routes Capell-specific behaviour through Actions, settings, bridges, and resource configurators.

For teams: Operators can review access history, failed logins, IP addresses, user agents, and recent activity without opening database records.

This package makes its Composer dependencies visible because they are part of the value proposition, not just plumbing. When an upstream package has a public repository, its linked preview card points readers back to the maintainers so their work gets proper credit.

Capell packages used here

Open-source packages used here

Linked package previews

Laravel Authentication Log GitHub preview

Filament Authentication Log GitHub preview

Screenshots are generated from docs/screenshots.json during package deployment.

  • Authentication logs admin index.
  • Authentication log table filters.
  • Dashboard widget.
  • Authentication log settings screen.
  • User edit access summary.
  • User authentication logs relation manager.
  • LoginAuditServiceProvider registers config, translations, migrations, settings, protected table metadata, the frontend.activity middleware alias, and the LoginAudit model override.
  • AdminServiceProvider registers the admin bridge, Filament resource, dashboard widget, settings contributor, persistent admin middleware, and monthly login-audit:purge schedule.
  • LoginAuditResource extends Tapp\FilamentAuthenticationLog\Resources\AuthenticationLogResource and replaces the table with LoginAuditsTable.
  • AdminActivityMiddleware and UserActivityMiddleware update matching audit rows without changing unrelated vendor audit state.
AreaPathPurpose
Actionspackages/login-audit/src/ActionsDomain operations. Test these directly where possible.
Modelspackages/login-audit/src/ModelsEloquent records owned by the package.
Filamentpackages/login-audit/src/FilamentAdmin resources, pages, widgets, and settings UI.
HTTPpackages/login-audit/src/HttpControllers, middleware, and request handling.
Providerspackages/login-audit/src/ProvidersRegistration, extension hooks, routes, migrations, and resources.
Resourcespackages/login-audit/resourcesViews, translations, assets, and package resources.
Configpackages/login-audit/configPackage configuration and publishable config.
Databasepackages/login-audit/databaseMigrations, seeders, and settings migrations.
Testspackages/login-audit/testsPackage-level Pest coverage.
  • Resources: LoginAuditResource.
  • Widgets: LoginAuditsWidget.
  • Settings: LoginAuditSettingsSchema.
  • User resource bridge: LoginAuditUserSchemaExtender adds access summary state and LoginAuditsRelationManager when the host user model supports authentication logs.
  • login_audit stores authenticatable type/id, IP address, user agent, login time, and logout time.

  • Records belong polymorphically to authenticatable users.

  • Config purge value defaults to 365 days.

  • ApplyLoginAuditSettingsAction applies retention and IP tracking settings before the scheduled purge runs.

  • ResolveLoginAuditIpAddressAction reads the configured CDN header when login-audit.behind_cdn is enabled; otherwise it uses the request IP.

  • Models: LoginAudit.

  • Migrations: 2026_05_10_190857_01_create_login_audit_table.php.

  • Config: packages/login-audit/config/login-audit.php.

  • Register Capell extension points, routes, migrations, settings, render hooks, and resources from service providers.
  • Adds login_audit table.
  • Adds settings migration.
  • Adds authentication log admin resource and widget.
  • Listens to Laravel auth events configured in login-audit.php.
  • May send new-device or failed-login notifications depending on config.
  • Install with composer require capell-app/login-audit in the host Capell application.
  • Run migrations through the host application package install flow.
  • In this repository, verify package changes with vendor/bin/pest; do not use php artisan.

Until rappasoft/laravel-authentication-log merges Laravel 13 support from PR #140, host Laravel 13 apps need the PR fork as a root Composer repository and alias:

{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/fdemb/laravel-authentication-log"
}
],
"require": {
"rappasoft/laravel-authentication-log": "dev-main as 6.0.1"
}
}

The package itself keeps the normal ^6.0|^5.0 dependency so it can move back to upstream tags when Laravel 13 support is released.

  • LoginAuditResource (packages/login-audit/src/Filament/Resources/LoginAudits/LoginAuditResource.php)

  • LoginAuditsWidget (packages/login-audit/src/Filament/Widgets/LoginAuditsWidget.php)

  • LoginAuditSettingsSchema (packages/login-audit/src/Filament/Settings/LoginAuditSettingsSchema.php)

  • LoginAuditsRelationManager (packages/login-audit/src/Filament/Resources/Users/RelationManagers/LoginAuditsRelationManager.php)

  • LoginAuditsWidget is gated by admin and super_admin roles and the login_audits dashboard setting.

  • The user-resource bridge is controlled by the package settings and the host admin bridge support.

The Laravel 13 demo harness has screenshots for the Login Audit resource, table filters, settings schema, dashboard/widget configuration, user edit access summary, and user relation use case. The relation use case requires the host user model to expose Rappasoft’s authentications() relationship, normally by using AuthenticationLoggable.

  • Set CDN IP header config before trusting IP addresses behind a proxy.
  • Confirm notification settings before production rollout.
  • Run migrations before loading the resource.
  • In Laravel 13 apps, install the Rappasoft PR fork at the root app level until upstream ships a compatible tag.

Run package tests from the repository root:

Terminal window
vendor/bin/pest packages/login-audit/tests --configuration=phpunit.xml
  • Put behaviour changes in src/Actions/; UI classes, commands, and controllers should call actions instead of owning domain logic.