programic / laravel-hoorayhr
Wrapper for the HoorayHR API
Installs: 16
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:package
Requires
- ext-json: *
- guzzlehttp/guzzle: ~6.0 | ~7.0
README
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.