1. Go to this page and download the library: Download acacha/periods library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
acacha / periods example snippets
...
/*
* Package Service Providers...
*/
Acacha\Periods\Providers\PeriodsServiceProvider::class,
...
php artisan vendor:publish --tag=acacha_periods
return [
/*
|--------------------------------------------------------------------------
| Session variable name for periods
|--------------------------------------------------------------------------
|
| This value is the name of the session vairable that storages desired period.
*/
'session_variable' => 'ACACHA_PERIOD',
/*
|--------------------------------------------------------------------------
| Valid period values and related database connections
|--------------------------------------------------------------------------
|
| This value is an array that stores valid period values and his related
| database connections.
*/
'periods' => [
'2016-17' => env('DB_CONNECTION', 'mysql'),
'2015-16' => env('DB_CONNECTION', 'mysql') . '_1516',
'2014-15' => env('DB_CONNECTION', 'mysql') . '_1415',
],
];