Download the PHP package escolalms/pencil-spaces without Composer
On this page you can find all versions of the php package escolalms/pencil-spaces. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download escolalms/pencil-spaces
More information about escolalms/pencil-spaces
Files in escolalms/pencil-spaces
Package pencil-spaces
Short Description Escola Headless LMS Pencil Spaces integration
License MIT
Informations about the package pencil-spaces
Pencil-Spaces
What does it do
This package is used for integration with Pencil Spaces.
Currently available features:
- API user creation
- Space creation
- Generating a link for the logged-in user
Installing
composer require escolalms/pencil-spaces
php artisan migrate
Configuration
You can configure the package by adding values to your .env
file
or using Facade
or /api/admin/config
endpoint
Example
Use EscolaLms\PencilSpaces\Facades\PencilSpace
Facade for integration.
- Generate a direct login link for an API-managed user =>
PencilSpace::getDirectLoginUrl(int $userId, string $redirectUrl = null)
- Create Space =>
PencilSpace::createSpace(CreatePencilSpaceResource $createSpaceResource)
An account in Pencil Space will be created for users who don't have one. The table pencil_space_accounts
will store the userId
and email
returned from Pencil Space.
Endpoints
Tests
Run ./vendor/bin/phpunit
to run tests.
Test details
You can use PencilSpace::fake()
in your tests. Requests to the API will be mocked, and you will be able to test your feature.
Listeners
This package doesn't listen for any events.
All versions of pencil-spaces with dependencies
escolalms/auth Version ^0
escolalms/core Version ^1
escolalms/settings Version ^0
laravel/framework Version >=8.0