LaravelPackages.net
Acme Inc.
Toggle sidebar
programic/laravel-hoorayhr

Wrapper for the HoorayHR API

17
0
v1.0.0
About programic/laravel-hoorayhr

programic/laravel-hoorayhr is a Laravel package for wrapper for the hoorayhr api. It currently has 0 GitHub stars and 17 downloads on Packagist (latest version v1.0.0). Install it with composer require programic/laravel-hoorayhr. Discover more Laravel packages by programic or browse all Laravel packages to compare alternatives.

Last updated

Programic - HoorayHR API

Latest Version on Packagist Total Downloads

This package is a wrapper for the HoorayHR API

Installation

This package requires PHP 7.2 and Laravel 5.8 or higher.

composer require programic/permissions

Setup

Add Hooray credentials to config/services.php

return [
    'hooray' => [
           'username' => env('HOORAY_USERNAME', '')
           'password' => env('HOORAY_PASSWORD', '')
    ],
];

And update .env credentials.

Basic Usage

use Programic\Hooray\HoorayHR;

public function index(HoorayHR $hooray) {
    // Fetch users
    $hooray->getUsers();
    
    // Fetch & filter calendars
    $hooray->getCalenders(['year' => 2021, 'userId' => 1]);
}

Extended Credentials

You can update the HoorayHR credentials per auth user. This is possible to add the following in a Service Provider:

use Programic\Hooray\HoorayHR;

$this->app->resolving(HoorayHR::class, function ($hooray) {
    $hooray->setCredentials('username', 'password');
});

Testing

composer test

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security-related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Comments