This package is a PHP wrapper for iSAMS (https://isams.com) using their REST API. It transforms the json objects returned from the API into model instances.
See https://developerdemo.isams.cloud/Main/swagger/ui/index for their API documentation & https://developer.isams.com/display/PRA/Getting+started+-+REST+API
This package requires PHP 8.1 & Laravel 9.0 or higher. See the tests/
folder for documentation. (We'd quite like someone to write some proper documentation)
You can install this package via composer using:
composer require spkm/isams
The package will automatically register its service provider
To publish the config file to config/isams.php
run:
php artisan vendor:publish --provider="spkm\isams\IsamsServiceProvider"
Update the config file & add the REST API secret(s) to your .env file
If you are using a School model, implement the interface \spkm\isams\Contracts\Institution
:
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class School extends Model implements \spkm\isams\Contracts\Institution
{
/**
* Define the name used to identify this Schools entry in the config
*/
public function getConfigName(): string
{
return 'cranleighSandbox';
}
}
In your config/isams.php
file, add the following to the schools
array:
'cranleighSandbox' => [
'api_key' => env('ISAMS_API_KEY'),
'api_secret' => env('ISAMS_API_SECRET'),
'api_url' => env('ISAMS_API_URL'),
],
Otherwise implement the interface on your custom class (or copy the example spkm\isams\School
)
composer test
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email spkm@cranleigh.org instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.