2017 © Pedro Peláez
 

laravel-package larachileanlaw

Provides an wrapper to leychile.cl with Laravel 5.3.

image

unforgivencl/larachileanlaw

Provides an wrapper to leychile.cl with Laravel 5.3.

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

The README.md

LaraChileanLaw - Wrapper for leychile.cl web service

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

Installation

To add this package on your Laravel project add this on your `composer.json file, (*2)

"unforgivencl/larachileanlaw": "dev-master"

To install and configure add the service provider to your config/app.php, (*3)

Unforgivencl\LaraChileanLaw\LaraChileanLawServiceProvider::class,

If you want to use the Facade add this to your facade section on config/app.php, (*4)

'LaraChileanLaw' => Unforgivencl\LaraChileanLaw\Facades\LaraChileanLaw::class,

Usage

For example if you want to get the latests 5 laws published you can use, (*5)

$laws = LaraChileanLaw::law()->paginate(5)->getLatestPublished()->fetch();

If you want the law that contains an text with your input you can use, (*6)

$laws = LaraChileanLaw::law()->paginate(5)->content('aborto')->getByContent()->fetch();

If you want a specific law by BCN with the latest version you can use, (*7)

$law = LaraChileanLaw::law()->number('1')->getLatestSpecific()->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, (*8)

Development

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

The Versions

18/10 2016

dev-master

9999999-dev

Provides an wrapper to leychile.cl with Laravel 5.3.

  Sources   Download

MIT

The Requires

 

by guillermo lobos