PHPackages                             swisnl/laravel-lti-provider - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. swisnl/laravel-lti-provider

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

swisnl/laravel-lti-provider
===========================

Laravel lti provider

0.2.0(6mo ago)44.1k1[1 PRs](https://github.com/swisnl/laravel-lti-provider/pulls)MITPHPPHP ^8.1 | ^8.2 | ^8.3 | ^8.4CI passing

Since Nov 24Pushed 6mo ago2 watchersCompare

[ Source](https://github.com/swisnl/laravel-lti-provider)[ Packagist](https://packagist.org/packages/swisnl/laravel-lti-provider)[ Docs](https://github.com/swisnl/laravel-lti-provider)[ RSS](/packages/swisnl-laravel-lti-provider/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (10)Versions (6)Used By (0)

Laravel LTI Provider
====================

[](#laravel-lti-provider)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f0d3003446393becb66e4d231874f19281a37bf61484ec349ab266963017ca83/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f737769736e6c2f6c61726176656c2d6c74692d70726f76696465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/swisnl/laravel-lti-provider)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Buy us a tree](https://camo.githubusercontent.com/cec0a9b35a1c3235bdbe0d13ea8fbd866a23e30280ad6ca27078c1fd4ac1b709/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f54726565776172652d2546302539462538432542332d6c69676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://plant.treeware.earth/swisnl/laravel-lti-provider)[![Build Status](https://camo.githubusercontent.com/c5bac245674c10955852574b9c3eb7754be2c2b800d64c83664b28ac72a7d1d4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f737769736e6c2f6c61726176656c2d6c74692d70726f76696465722f72756e2d74657374732e796d6c3f6c6162656c3d7465737473266272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://github.com/swisnl/laravel-lti-provider/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/282396110ee6db49b7bbc366c2085e97c72456710dcfd97eb588469108444746/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f737769736e6c2f6c61726176656c2d6c74692d70726f76696465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/swisnl/laravel-lti-provider)[![Made by SWIS](https://camo.githubusercontent.com/ef6bdd6ab8d4f47bceb74dcf558b0915c6b419cbba320096324af0518e43091d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2546302539462539412538302d6d6164652532306279253230535749532d2532333037333741392e7376673f7374796c653d666c61742d737175617265)](https://www.swis.nl)

This packages provides a bridge between the [Celtic LTI Package](https://github.com/celtic-project/LTI-PHP) and Laravel models, by implementing a DataConnector for the Celtic LTI Package.

Install
-------

[](#install)

Via Composer

```
$ composer require swisnl/laravel-lti-provider
```

Then run command to copy the required files (including the migrations) into your project.

```
php artisan lti-provider:install
```

If you have Laravel package auto discovery disabled, add the service provider to your `config/app.php` file:

```
'providers' => [
    // ...
    Swis\Laravel\Lti\Providers\LtiProviderServiceProvider::class,
];
```

Finally run the migrations.

```
php artisan migrate
```

Cron jobs
---------

[](#cron-jobs)

The package comes with a command to clean up expired LTI nonces. To run this command, add the following to your `app/Console/Kernel.php` file:

```
    protected function schedule(Schedule $schedule)
    {
        // ...
        $schedule->command('lti-provider:delete-expired-nonces')->daily();
    }
```

Usage
-----

[](#usage)

Define a model that you use as an LTI environment. This model should implement the `Swis\Laravel\Lti\Contracts\LtiEnvironment`. The packages scopes all other models to the current LTI environment.

Using this this environment, you can create a new `ModelDataConnector` instance. This instance can be used like the `DataConnector` from the Celtic LTI Package.

```
    $environment = MyLtiEnvironment::find($id);
    $dataConnector = new ModelDataConnector($environment);
```

Customization
-------------

[](#customization)

This package allows overriding most of the models. We use this to override some models to use UUIDs instead of numeric ids, and to add some extra functionality (examples of this extra functionality: adding logging to `UserResult`; and using the same `Client` model for both LTI and [Laravel Passport](https://laravel.com/docs/10.x/passport)).

To override a model (except the client), create a new class that extends the original model and register the new model in the `config/lti-provider.php` file. For example, to override the `UserResult` model, create a new class that extends the `Swis\Laravel\Lti\Models\UserResult` class and change the following to your `config/lti-provider.php` file:

```
        'models' => [
            'user-result' => 'REFERENCE TO YOUR NEW CLASS',
        ],
```

Clients are a bit different, because you don't need to extend from an existing class. To override the client, create a new class that implements the `Swis\Laravel\Lti\Contracts\Client` interface and register the new model in the `config/lti-provider.php` file.

For inspiration on how to implement your own client, take a look at the `Swis\Laravel\Lti\Models\SimpleClient` class (a very basic implementation) or the `\Workbench\App\OverrideModels\Client` class (this is a more complex example used in the tests to check if it is possible to override the default implementation and if the package can handle clients with UUIDs instead of numeric ids).

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Thomas Wijnands](https://github.com/tommie1001)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

This package is [Treeware](https://treeware.earth). If you use it in production, then we ask that you [**buy the world a tree**](https://plant.treeware.earth/swisnl/laravel-lti-provider) to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.

SWIS ❤️ Open Source
-------------------

[](#swis-heart-open-source)

[SWIS](https://www.swis.nl) is a web agency from Leiden, the Netherlands. We love working with open source software.

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance67

Regular maintenance activity

Popularity26

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 61.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~356 days

Total

3

Last Release

195d ago

PHP version history (3 changes)0.1.0PHP ^8.1

0.1.1PHP ^8.1 | ^8.2 | ^8.3

0.2.0PHP ^8.1 | ^8.2 | ^8.3 | ^8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8734305?v=4)[SWIS](/maintainers/swisnl)[@swisnl](https://github.com/swisnl)

---

Top Contributors

[![rolfvandekrol](https://avatars.githubusercontent.com/u/434397?v=4)](https://github.com/rolfvandekrol "rolfvandekrol (37 commits)")[![tommie1001](https://avatars.githubusercontent.com/u/50906358?v=4)](https://github.com/tommie1001 "tommie1001 (10 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")[![JaZo](https://avatars.githubusercontent.com/u/3475007?v=4)](https://github.com/JaZo "JaZo (2 commits)")[![Rkallenkoot](https://avatars.githubusercontent.com/u/3198607?v=4)](https://github.com/Rkallenkoot "Rkallenkoot (1 commits)")

---

Tags

hacktoberfestlaravelltilti-providerswisnllaravel-lti

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/swisnl-laravel-lti-provider/health.svg)

```
[![Health](https://phpackages.com/badges/swisnl-laravel-lti-provider/health.svg)](https://phpackages.com/packages/swisnl-laravel-lti-provider)
```

###  Alternatives

[lab404/laravel-impersonate

Laravel Impersonate is a plugin that allows to you to authenticate as your users.

2.3k16.4M48](/packages/lab404-laravel-impersonate)[overtrue/laravel-follow

User follow unfollow system for Laravel.

1.2k404.7k5](/packages/overtrue-laravel-follow)[stephenjude/filament-two-factor-authentication

Filament Two Factor Authentication: Google 2FA + Passkey Authentication

81158.7k4](/packages/stephenjude-filament-two-factor-authentication)[marcelweidum/filament-passkeys

Use passkeys in your filamentphp app

5925.8k](/packages/marcelweidum-filament-passkeys)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
