Package Data | |
---|---|
Maintainer Username: | Unforgivencl |
Maintainer Contact: | guillermo.lobos.parada@gmail.com (guillermo lobos) |
Package Create Date: | 2016-10-17 |
Package Last Update: | 2016-10-17 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2025-02-12 15:10:04 |
Package Statistics | |
---|---|
Total Downloads: | 7 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Package to facilitate the use of leychile.cl web service using Laravel
To add this package on your Laravel project add this on your `composer.json file
"unforgivencl/larachileanlaw": "dev-master"
To install and configure add the service provider to your config/app.php
Unforgivencl\LaraChileanLaw\LaraChileanLawServiceProvider::class,
If you want to use the Facade add this to your facade section on config/app.php
'LaraChileanLaw' => Unforgivencl\LaraChileanLaw\Facades\LaraChileanLaw::class,
For example if you want to get the latests 5 laws published you can use
$laws = LaraChileanLaw::law()->paginate(5)->getLatestPublished()->fetch();
If you want the law that contains an text with your input you can use
$laws = LaraChileanLaw::law()->paginate(5)->content('aborto')->getByContent()->fetch();
If you want a specific law by BCN with the latest version you can use
$law = LaraChileanLaw::law()->number('1')->getLatestSpecific()->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
This package are under development so if you find any bug feel free to send PR or send an issue.