2017 © Pedro Peláez
 

laravel-package larachileancongress

Provides an wrapper to opendata.congreso.cl with Laravel 5.3.

image

unforgivencl/larachileancongress

Provides an wrapper to opendata.congreso.cl with Laravel 5.3.

  • Tuesday, November 1, 2016
  • by Unforgivencl
  • Repository
  • 1 Watchers
  • 1 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

LaraChileanCongress - Wrapper for opendata.congreso.cl web service

Package to facilitate the use of opendata.congreso.cl web service using Laravel, (*1)

Installation

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,

Usage

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();

Response

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)

Development

This package are under development so if you find any bug feel free to send PR or send an issue., (*10)

The Versions

01/11 2016

dev-master

9999999-dev

Provides an wrapper to opendata.congreso.cl with Laravel 5.3.

  Sources   Download

MIT

The Requires

 

by guillermo lobos