escolalms/assign-without-account
最新稳定版本:0.1.18
Composer 安装命令:
composer require escolalms/assign-without-account
包简介
Escola Headless LMS Assign without account
README 文档
README
What does it do
The package is used to assign users without an account.
Installing
composer require escolalms/assing-without-accountphp artisan migratephp artisan db:seed --class="EscolaLms\AssignWithoutAccount\Database\Seeders\AssignWitoutAccountPermissionSeeder"
Requirements
You need to define email templates in the Templates package for AssignToProduct and AssignToProductable events.
Database
user-submissions
| id | status | created_at | updated_at | morphable_type | morphable_id | |
|---|---|---|---|---|---|---|
| 1 | test@email.com | sent | 2022-04-15 07:36:12 | 2022-04-15 07:36:12 | App\Models\Course | 1 |
| 2 | test@email.com | accepted | 2022-04-15 07:36:30 | 2022-04-15 07:36:30 | EscolaLms\Cart\Models\Product | 2 |
Example
- Create user submission like this:
POST /api/admin/user-submissions
{
"email": "test@email.com",
"morphable_id": 2,
"morphable_type": "EscolaLms\\Cart\\Models\\Product"
}
- Create a new account.
- The product is assigned to your account.
Endpoints
All the endpoints are defined in swagger
Tests
Run ./vendor/bin/phpunit to run tests. See tests folder as it's quite good staring point as documentation appendix.
Events
AssignToProduct- event dispatched after assigning user to product.AssignToProductable- event dispatched after assigning user to productable model.
Listeners
AccountRegisteredListener- listens to newly created accounts.
How to use this on frontend.
Admin panel
Permissions
Permissions are defined in seeder
统计信息
- 总下载量: 10.49k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-02-21
