PHP code example of reksakarya / laravel-signature

1. Go to this page and download the library: Download reksakarya/laravel-signature library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

reksakarya / laravel-signature example snippets

composer dump-autoload

$ php artisan vendor:publish --tag=laravel-signature


...
use LaravelSignature\Helpers\Signature;
...

class YourPortalController {
  ...
  
  public function getRealisasiPendapatan($year)
  {
      ...
      $url = 'https://ditdal.kominfo.go.id/api/portal-pendapatan/realisasi?tahun='.$year
      $signatureEpnbp = Signature::epnbp($url);
      ...
      
      ...
      $url = 'https://epnbp.baktikominfo.id/api/portal-pendapatan/realisasi?tahun='.$year
      $signatureKerjasamaBU = Signature::kerjasamabu($url);
      ...
      
      ...
      $url = 'https://epnbp.baktikominfo.id/bank/api/portal-pendapatan/realisasi?tahun='.$year
      $signatureJasaPerbankan = Signature::jasaperbankan($url);
      ...

      ...
      $url = 'https://epnbp.baktikominfo.id/pendapatanlainlain/api/portal-pendapatan/realisasi?tahun='.$year
      $signatureJasaPerbankan = Signature::pendapatanlainlain($url);
      ...
  } 
  ...
}