PHPackages                             acacha/periods - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. acacha/periods

ActiveLibrary

acacha/periods
==============

Laravel 5 package to add suport for historical data using multiple databases

0.1.0(9y ago)1392MITPHPPHP ~5.6|~7.0

Since Nov 11Pushed 9y ago1 watchersCompare

[ Source](https://github.com/acacha/periods)[ Packagist](https://packagist.org/packages/acacha/periods)[ Docs](https://github.com/acacha/periods)[ RSS](/packages/acacha-periods/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

periods
=======

[](#periods)

[![Latest Version on Packagist](https://camo.githubusercontent.com/04c8001ee9f6bab410d874ec8cb1e80d6d293b4f36188b6be64b47769cc1898d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6163616368612f706572696f64732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/acacha/periods)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/52ecc3b531407abc1cc58e1b8dd26025df48d3aa008855e31940b213fc763079/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6163616368612f706572696f64732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/acacha/periods)[![Coverage Status](https://camo.githubusercontent.com/50213f70d2c47a678fb6fa8d405b21aa58998e52797d8e33c48245736df604d3/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6163616368612f706572696f64732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/acacha/periods/code-structure)[![Quality Score](https://camo.githubusercontent.com/a2291575a58d7fc989c9fb6182a7b3b78474939b5f1c41ccb5f0b8edf18a48e0/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6163616368612f706572696f64732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/acacha/periods)[![Total Downloads](https://camo.githubusercontent.com/fef0bc2b43e42745349fc5ca5863d2f5a4a248892efc4fb69283b5c332d244ba/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6163616368612f706572696f64732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/acacha/periods)

Laravel 5 packages to support multiple database connections for historical data (One period -&gt; One database connection)

Install
-------

[](#install)

Via Composer

```
$ composer require acacha/periods
```

Add **PeriodsServiceProvider** service provider to **config/app.php** file:

```
...
 /*
         * Package Service Providers...
         */
        Acacha\Periods\Providers\PeriodsServiceProvider::class,
...
```

Publish files with:

```
php artisan vendor:publish --tag=acacha_periods
```

Usage
-----

[](#usage)

Register Laravel Middleware on class **App\\Http\\Kernel.php** at the end of web middleware group:

```
...
 protected $middlewareGroups = [
        'web' => [
            ...
            \Acacha\Periods\Middleware\Periods::class
        ],
...
```

Customize your config. First adapt to your needs fil **config/periods.php**:

```
