loopy/spartan-sdk-laravel

Laravel wrapper for spartan sdk

1.0.6 2018-05-11 00:32 UTC

This package is not auto-updated.

Last update: 2022-10-26 18:29:16 UTC


README

Simple!

Add composer dependency

composer require loopy/spartan-sdk-laravel

Add config in the services.php file

    'spartan' => [
        'id' => env('SPARTAN_APP_ID'),
        'secret' => env('SPARTAN_APP_SECRET'),
    ],

Set the environment variables

SPARTAN_APP_ID=some_string

SPARTAN_APP_SECRET=some_other_string

You can extend the Customer class

use Loopy\Spartan\Customer;

class Member extends Customer
{

}

You can use it as

Member::query()->find('national', '12345678')

For the sdk documentation the Customer class extends the Member class provided by the sdk, all the methods found there can be used. Refer to the SDK documentation