Skip to content

Laravel package to connect to external database and fetch data

Notifications You must be signed in to change notification settings

basduchambre/external-db-connect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

External DB Connect - Laravel package

This module will connect through an external database to periodically pull in data stored in another database. The metrics can that you want to pull in have to be defined in the config file and the migration is generated by an Artisan command.


How to use

  1. Require the package with composer require basduchambre/external-db-connect (not working, not on packagist yet...)
  2. Install the package with php artisan externaldb:install
  3. This will publish a config call in your Laravel config dir named externaldb.php
  4. Configure the database connection settings and the columns to be fetched, make sure the naming is identical of the columns you're targeting
  5. To generate a migration file, use the command php artisan externaldb:migration
  6. TODO ...

Requirements

  • Remote access has to be enabled on the database that will be called upon

Package includes the following (unfinished)

  • Service provider
  • Migration file
  • Config file
    • External DB connect settings
    • Measurement interval in minutes, e.g. 1 hour will be (int) 60
    • Metrics to pull identified by column name as array, e.g. ['email_address', 'zip_codes', 'location']
  • Artisan command to generate migration based on config
  • Artisan command, e.g. php artisan externaldb:fetch
  • Controllers

Deliverables

By creating a composer package it will be easy to add this to the core API, or leave it out when not needed.

About

Laravel package to connect to external database and fetch data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages