rangkotodotcom/simanang

An http client library to connect to the SIMANANG API

1.0.1 2024-11-09 07:39 UTC

This package is auto-updated.

Last update: 2025-05-09 08:38:18 UTC


README

This package is used to interact with the SIMANANG API belonging to SMAN 1 Enam Lingkung.

Latest Version on Packagist Total Downloads

Installation

You can install the package via composer:

composer require rangkotodotcom/simanang

Setup

You must register the service provider :

// config/app.php

'Providers' => [
   // ...
   Rangkotodotcom\Simanang\SimanangServiceProvider::class,
]

If you want to make use of the facade you must install it as well :

// config/app.php

'aliases' => [
    // ...
    'Simanang' => Rangkotodotcom\Simanang\Simanang::class,
];

Next, You must publish the config file to define your SIMANANG CREDENTIAL :

php artisan vendor:publish --provider="Rangkotodotcom\Simanang\SimanangServiceProvider"

This is the contents of the published file :

return [

    /*
    |--------------------------------------------------------------------------
    | Simanang Mode
    |--------------------------------------------------------------------------
    |
    | By default, use development. Supported Mode: "development", "production"
    |
    */

    'simanang_mode' => env('SIMANANG_MODE', 'development'),

    /*
    |--------------------------------------------------------------------------
    | Simanang Client ID
    |--------------------------------------------------------------------------
    |
    | Client ID from SIMANANG API
    |
    */

    'simanang_client_id' => env('SIMANANG_CLIENT_ID', ''),

    /*
    |--------------------------------------------------------------------------
    | Simanang Client Secret
    |--------------------------------------------------------------------------
    |
    | Client Secret from SIMANANG API
    |
    */

    'simanang_client_secret' => env('SIMANANG_CLIENT_SECRET', ''),
];

Set your SIMANANG CREDENTIAL in .env file :

APP_NAME="Laravel"
# ...
SIMANANG_MODE=developmentOrProduction
SIMANANG_CLIENT_ID=putYourClientIdHere
SIMANANG_CLIENT_SECRET=putYourClientSecretHere

Methods Ref

  • ::getSchool()

  • ::getVision()

  • ::getMision()

  • ::getGallery()

  • ::getHeadMaster()

  • ::getCurrentSemester()

  • ::getStudent()

  • ::getTeacher()

  • ::validasiQrCode()

  • ::storeQrCode()

  • ::pushNotification()

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.