swisnl/laravel-lti-provider
Composer 安装命令:
composer require swisnl/laravel-lti-provider
包简介
Laravel lti provider
关键字:
README 文档
README
This packages provides a bridge between the Celtic LTI Package and Laravel models, by implementing a DataConnector for the Celtic LTI Package.
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
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
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
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).
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
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email security@swis.nl instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
This package is Treeware. If you use it in production, then we ask that you buy the world a tree 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 is a web agency from Leiden, the Netherlands. We love working with open source software.
swisnl/laravel-lti-provider 适用场景与选型建议
swisnl/laravel-lti-provider 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4.59k 次下载、GitHub Stars 达 4, 最近一次更新时间为 2023 年 11 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「swisnl」 「laravel-lti」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 swisnl/laravel-lti-provider 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 swisnl/laravel-lti-provider 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 swisnl/laravel-lti-provider 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Fixture handler for Guzzle 6+
Model Context Protocol client implementation in PHP
PHP server integration for AG-UI - standardized AI agent frontend communication via Server-Sent Events
NDW Melvin API client
Integrates spatie/laravel-activitylog with Filament
Geometry form field for Filament PHP
统计信息
- 总下载量: 4.59k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-11-24