Looking to hire Laravel developers? Try LaraJobs
This package is not available.

laravel-hoorayhr maintained by programic

Description
Wrapper for the HoorayHR API
Author
Last update
2021/08/13 11:11 (dev-main)
License
Links
Downloads
17

Comments
comments powered by Disqus

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 info@programic.com instead of using the issue tracker.

Credits

License

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