Download the PHP package carloeusebi/laravel-comuni without Composer
On this page you can find all versions of the php package carloeusebi/laravel-comuni. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download carloeusebi/laravel-comuni
More information about carloeusebi/laravel-comuni
Files in carloeusebi/laravel-comuni
Package laravel-comuni
Short Description A package to retrieve italians comuni, province and regions using various apis.
License MIT
Informations about the package laravel-comuni
Laravel Comuni
A Laravel package that provides a simple and elegant way to retrive italian comuni, province and regioni. This package uses third party apis and provides only an easy wrapper to access those apis.
Currently supported apis:
Installation
You can install the package via composer:
The package will automatically register its service provider.
Usage
This package provides a simple facade to access Italian geographical data:
Filtering and Pagination
You can filter and paginate results using the params
array:
Available Parameters
For available parameters please refer to third parties documentations:
Configuration
You can publish the configuration file with:
This will create a config/comuni.php
file where you can modify the default settings:
You can safely cache the responses for a long period of time. As these services are hosted on free platforms, please consider keeping responses cached as long as possible.
Response Format
All methods return Laravel Collections. Here's an example of the data structure for each type:
Comuni
Province
Regioni
Returns a collection of region names as strings:
Faking
This package already has a comprehensive test suite. You don't need to test this package in your app.
But if you would like to test your implementation of this package, you can mock Comuni
and decide what it should
return, or you can fake it and this package will generate a fake generic response for you.
Testing
This package includes a comprehensive test suite. To run tests:
All versions of laravel-comuni with dependencies
illuminate/http Version ^12.19
illuminate/support Version ^12.19
illuminate/cache Version ^12.19
illuminate/testing Version ^12.19