dev-master
9999999-devProvides an wrapper to opendata.congreso.cl with Laravel 5.3.
MIT
The Requires
- php >=5.6.4
- guzzlehttp/guzzle ^6.2
by guillermo lobos
Provides an wrapper to opendata.congreso.cl with Laravel 5.3.
Package to facilitate the use of opendata.congreso.cl web service using Laravel, (*1)
To add this package on your Laravel project add this on your `composer.json file, (*2)
"unforgivencl/larachileancongress": "dev-master"
To install and configure add the service provider to your config/app.php
, (*3)
Unforgivencl\LaraChileanCongress\LaraChileanCongressServiceProvider::class,
If you want to use the Facade add this to your facade section on config/app.php
, (*4)
'ChileanCongress' => Unforgivencl\LaraChileanCongress\Facades\LaraChileanCongress::class,
For example if you want to get all delegates you can use, (*5)
In some endpoints the web service changes url (delegates), to use that WS you need to change
with setDelegates()
method, if you use the senators endpoint use setSenators()
, by
default it's set to Senators, (*6)
$delegates = ChileanCongress::delegate()->setDelegates()->getDelegates()->fetch();
If you want to get information of a votation of senators you can use, (*7)
$votation = ChileanCongress::votation()->number('8575')->getSenatorsVotation()->fetch();
If you want to get a specific law project you can use, (*8)
$lawProject = ChileanCongress::lawproject()->number('1')->getLawProject()->fetch();
All responses are converted to JSON from an XML Response, if you see any weird index or order, i'm sorry but the web service are very incosistent, (*9)
This package are under development so if you find any bug feel free to send PR or send an issue., (*10)
Provides an wrapper to opendata.congreso.cl with Laravel 5.3.
MIT