Skip to content

muhfarkhans/lpse-gg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lpse-gg

a tool for scraping datatables data from lpse website indonesia gov.

Requirements

  • PHP 7.4 or greater

Installation

composer require muhfarkhans/lpsegg

Usage

Lpse-gg is available on Packagist (using semantic versioning), and installation via composer is the recommended way to install thic package. Just add this line to your composer.json file:

"muhfarkhans/lpsegg": "^1.1"

or run

composer require muhfarkhans/lpsegg

after installation you can import class LpseTable to your controller or php file

use App\Lpsegg\LpseTable;
$lp = new LpseTable();

Step 1: you need create params for get data table. uou can use this link to see what do you need

$params = [
    // 'kategoriId' => 2,
    // 'rekanan' => "", 
    // 'tahun' => "",
    // 'instansiId' => "",
    // 'search[value]' => "",
    // 'start'  => 0, 
    // 'length' => 20, // moderate if start filled
];

$data = $lp->getTable($params);

Step 2: generate response

To Array

$array = $lp->getArray($data);
print_r($array);

To JSON

$json = $lp->getJson($data);
echo $json;

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages