Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Lrs Laravel Package

escolalms/lrs

Laravel integration for a Learning Record Store (LRS), letting your app store, query, and exchange xAPI learning activity statements so you can track and report on learner experiences across systems.

View on GitHub
Deep Wiki
Context7

Getting Started

Release 0.0.13 is a small but meaningful update: it adds PHP 8.2 support and changes AuthServiceProvider. Start by confirming your app meets the package’s PHP/Laravel constraints, install with composer require escolalms/lrs, publish the package config/migrations using the provider documented by the package, then run migrations and configure authentication in config/lrs.php.

Run php artisan route:list and locate the LRS routes before writing client code. The first practical use case is recording a learning event: when a learner completes a lesson, send an xAPI statement to the LRS and then query statements by actor/activity/verb for reporting or progress display.

Implementation Patterns

  • Record statements from Laravel domain events via a small service or queued job. Build and validate the xAPI payload there rather than scattering payload arrays across controllers.
  • Use the package’s HTTP endpoints for browser/client-side tracking, but keep auth and CORS in mind. For server-side tracking, prefer an internal service/client so failures can be logged and retried.
  • Store the returned statement ID when you need to correlate LRS records with local models.
  • For reporting, query statements using actor, activity, verb, and time filters, and paginate. Keep report queries in dedicated classes or actions rather than mixing them into lesson controllers.
  • Re-test auth integration after 0.0.13. The AuthServiceProvider update is the main regression surface: verify guards, middleware, token handling, and any local overrides.
  • In tests, use RefreshDatabase, fake authenticated users/tokens, and assert both accepted statements and validation failures. A useful smoke test is posting a minimal statement and reading it back.

Gotchas and Tips

  • Clear config/cache after upgrading: php artisan config:clear and, where relevant, php artisan route:clear. Auth provider changes can be masked by cached config.
  • If you override auth guards, middleware, or policies, compare them against the updated AuthServiceProvider. Re-run auth-related feature tests.
  • PHP 8.2 support is now explicit, but still verify transitive dependencies and CI matrix. Watch for PHP 8.2 deprecations in custom code.
  • xAPI payloads are strict: send Content-Type: application/json, include valid actor, verb, and object, and use ISO 8601 timestamps. Statements are generally immutable, so correct mistakes by posting new statements rather than editing records.
  • Do not hard-code LRS route paths from examples; confirm them with route:list because route prefixes and middleware are configurable.
  • Browser-based clients commonly hit CORS and auth issues. Test from the same origin or configure CORS/middleware deliberately.
  • When debugging, inspect validation responses and application logs first, then use the LRS “about”/statement retrieval endpoints to confirm the service is reachable and authenticated.
  • Keep customizations in config, middleware, listeners, or wrapper services rather than editing vendor files; that keeps future minor releases like 0.0.13 low-friction.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings