Repository navigation
Upgrade guide
LaraLocker 3 is a rewrite. The 1.0 and 2.0 branches and master could not be installed on Laravel 7 or later, so moving to 3 is mostly a matter of the requirements and the config below. The facade calls you already use still work.
PHP 8.2+ and Laravel 12 or 13.
composer require ijeffro/laralocker:^3.0The .env names haven't changed. The config file is flat now, so if you published the old one, delete it and publish the new one:
rm config/laralocker.php
php artisan vendor:publish --tag=laralocker-config| Before | 3.x |
|---|---|
laralocker.learning-locker.api.url |
laralocker.url |
laralocker.learning-locker.api.key |
laralocker.key |
laralocker.learning-locker.api.secret |
laralocker.secret |
laralocker.learning-locker.xapi_statements.actor_hompage |
laralocker.xapi.homepage |
The laravel, database, export, queue and storage sections are gone.
| Before | 3.x |
|---|---|
| methods returned a JSON string | they return a decoded array |
| errors were returned as an exception object | errors are thrown as LearningLockerException
|
// before
$stores = json_decode(LearningLocker::stores()->get());
// 3.x
$stores = LearningLocker::stores()->get();| Before | 3.x |
|---|---|
LearningLocker::routes() and the package's /laralocker/* routes |
removed. Call the facade from your own controllers. |
php artisan laralocker:setup |
removed. Add the three .env values. |
| package migrations and models | removed |
Laralocker facade |
removed (it did nothing) |
journeys(), journey(), journeyProgress()
|
resource('journey', $id) and resource('journeyprogress', $id), Enterprise only |
statement()->create($data) |
statements()->send($data), or the xAPI facade |
persona($id)->identifier()->create($data) |
personaIdentifier()->create(['persona' => $id, 'ifi' => $ifi]) |
xAPI::...->store() |
send() (store() still works) |
The service provider moved to Ijeffro\Laralocker\LaralockerServiceProvider. If you list it in bootstrap/providers.php or config/app.php, update it or rely on package discovery.
where(), sort(), select(), populate(), skip(), limit(), first(), count() and paginate() are new (see Querying), as are aggregate(), ping(), clientInfo(), connect(), personaImports(), personaIdentifiers()->upsert() and reading statements with xAPI::statements().