ohdearapp / laravel-ohdear
Easily integrate the Oh Dear API into a Laravel app
Requires
- php: ^7.1
- laravel/framework: ~5.5.0|~5.6.0|~5.7.0
- ohdearapp/ohdear-php-sdk: ^1.2
Requires (Dev)
- orchestra/testbench: ~3.5.0|~3.6.0|~3.7.0
- phpunit/phpunit: ^7.0
This package is auto-updated.
Last update: 2020-02-10 01:09:00 UTC
README
This package makes it easy to work with the Oh Dear! sdk in a Laravel app. Once configured you can call all the sdk methods on the OhDear
facade
\OhDear::sites(); // gets all sites
Also, the OhDear\PhpSdk\Resources\Site
will be bound to the site which url matches the one specified in the site_url
value of the oh-dear
config file.
Installation
You can install the package via composer:
composer require ohdearapp/laravel-ohdear
Next you must publish the config file. This is the content that will be published to config/oh-dear.php
:
return [ /* * A valid API token for your Oh Dear! account. Instructions on how to get a * token can be found on this page: https://ohdear.app/docs/api/authentication */ 'api_token' => env('OH_DEAR_API_TOKEN', ''), /* * The url of your site as shown in Oh Dear. * It should start with either 'http' or 'https'. */ 'site_url' => env('OH_DEAR_SITE_URL', ''), ];
Usage
You can call all the sdk methods on the OhDear
facade:
\OhDear::sites(); // gets all sites
Take a look at the documentation of our php sdk to learn which methods are available.
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email freek@spatie.be instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.