bluora / laravel-datasets
Provides console commands, models and migration scripts to syncronize datasets.
Requires
- php: >=5.6.0
- guzzlehttp/guzzle: ^6.1
- hnhdigital-os/laravel-datasets-okfn: ~1.0
- league/csv: ^9.0
- league/flysystem: ^1.0
Requires (Dev)
- codeclimate/php-test-reporter: dev-master
- illuminate/database: 4.*|5.*
- phpunit/phpunit: 4.*
- symfony/process: ~2.3
This package is not auto-updated.
Last update: 2022-02-01 13:04:08 UTC
README
___ _ _
/ \ __ _ | |_ __ _ ___ ___ | |_ ___
/ /\ // _` || __|/ _` |/ __| / _ \| __|/ __|
/ /_//| (_| || |_| (_| |\__ \| __/| |_ \__ \
/___,' \__,_| \__|\__,_||___/ \___| \__||___/
Provides console commands, models and migration scripts to syncronize datasets into your applications database. Datasets are defined by array based configuration whilst advanced manipulation or data retrieval can be done through inline closures.
This package has been developed by H&H|Digital, an Australian botique developer. Visit us at hnh.digital.
Install
Via composer:
$ composer require hnhdigital-os/laravel-datasets ~1.0
This package's service provider will autoload from Laravel 5.5.
To enable the service provider in versions prior to Laravel 5.4, edit the config/app.php:
'providers' => [ ... HnhDigital\Datasets\ServiceProvider::class, ... ];
Available datasets
DATA.OKFN Collection (hnhdigital-os/laravel-datasets-okfn)
NOTE: This collection is included by default when you install this package.
- Country Codes
- Country Population
- Country Population (current)
- Language Codes
Australia Collection (hnhdigital-os/laravel-datasets-australia)
- Banks
- BSB
- Postcodes
Need a dataset? Request it, Pull Request it, or build it. Use the DATA.OKFN as a template.
If you do setup your own collection, please let us know so that we can put it on the official list.
Usage
List
$ php artisan datasets:list
Lists all the available dataset collections available to be installed.
Install
$ php artisan datasets:install {dataset}
Installs the specified dataset. This will create the table in the database and do an initial sync of the data.
Migrate
$ php artisan datasets:migrate {dataset}
Setup the table in the database. This will create the migration file in the right spot and add to the migrations table.
Use this console command when scheduling dataset update.
Sync
$ php artisan datasets:sync {dataset}
Downloads the data and insert/updates the existing records.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.