CampusUnion / Sked-Laravel by mopo922

Laravel Service Provider for Sked.
19
1
2
Package Data
Maintainer Username: mopo922
Package Create Date: 2016-03-06
Package Last Update: 2016-09-14
Language: PHP
License: MIT
Last Refreshed: 2024-12-16 15:03:26
Package Statistics
Total Downloads: 19
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 1
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

Sked-Laravel

Laravel 5 Service Provider for Sked.

Installation & Setup

Install the Sked Service Provider via Composer by adding the camusunion/sked-laravel package to the require object in your project's composer.json.

{
    ...
    "require": {
        "camusunion/sked-laravel": "dev-master"
    },
    ...
}

NOTE: This package automatically requires camusunion/sked, so you do NOT have to add it separately to your composer.json.

Then run composer update.

Next, add the Sked Service Provider to the providers array in config/app.php.

    'providers' => [
        ...
        CampusUnion\SkedServiceProvider::class,
    ],

Add the Sked facade to the aliases array in config/app.php.

    'aliases' => [
        ...
        'Sked' => CampusUnion\SkedFacade::class,
    ],

Configuration

The following environment variables are used to configure Sked:

SKED_DC_NAME=PDO
SKED_DC_DRIVER=mysql
SKED_DC_HOST=${DB_HOST}
SKED_DC_DBNAME=${DB_DATABASE}
SKED_DC_USER=${DB_USERNAME}
SKED_DC_PASS=${DB_PASSWORD}

Optional

To customize the configuration options, publish the configuration file using Artisan:

php artisan vendor:publish

Update your settings in the generated app/config/sked.php configuration file.

Usage

foreach (Sked::skeDates() as $skeDate) {
    // do something
}