hnhdigital-os / laravel-datasets by bluora

Provides console commands, models and migration scripts to syncronize datasets.
71
4
1
Package Data
Maintainer Username: bluora
Maintainer Contact: rocco@hnh.digital (Rocco Howard)
Package Create Date: 2016-12-29
Package Last Update: 2018-01-10
Language: PHP
License: MIT
Last Refreshed: 2024-04-18 15:07:05
Package Statistics
Total Downloads: 71
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 4
Total Watchers: 1
Total Forks: 0
Total Open Issues: 0
   ___        _                     _
  /   \ __ _ | |_  __ _  ___   ___ | |_  ___ 
 / /\ // _` || __|/ _` |/ __| / _ \| __|/ __|
/ /_//| (_| || |_| (_| |\__ \|  __/| |_ \__ \
/___,'  \__,_| \__|\__,_||___/ \___| \__||___/

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.

Latest Stable Version Total Downloads Latest Unstable Version Built for Laravel License

Build Status StyleCI Test Coverage Issue Count Code Climate

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.