Trying to use a non-Laravel package: https://packagist.org/packages/luceos/on-app
Edited composer.json to require it and did the composer install, update, then dump-autoload -o.
This package requires an initialization: vendor/luceos/on-app/src/OnAppInit.php
Which isn't a class and only has the one method. But it doesn't seem to be loaded when I try to bind it in a service provider. The version for the cloud is initiated in the OnAppInit.php but that isn't being done so the "version isn't supported" error comes up of course.
I know that I am missing a small detail but can't find it. Maybe in the service provider??
composer.json
"require": {
"luceos/on-app": "~3.5"
"autoload": {
"psr-4": {
"Luceos\\OnApp\\": "vendor/luceos/on-app/src/"
config/app.php
'providers' => [
'App\Providers\OnAppServiceProvider',
app/Providers/OnAppServiceProvider.php
public function register()
{
$this->app->bind('onapp', function($app)
{
$hostname = 'http://cloud';
$username = '[email protected]';
$password = 'api_key';
$factory = new \OnApp_Factory($hostname, $username, $password);
$setting = $factory->factory('Settings')->getList();
return $setting;
});
}
Looks like its there... vendor/composer/autoload_files.php
$vendorDir . '/luceos/on-app/src/OnAppInit.php',
vendor/composer/autoload_psr4.php
'Luceos\\OnApp\\' => array($vendorDir . '/luceos/on-app/src'),
Regarding the Guzzle question: Just include it in your composer.json file:
"guzzlehttp/guzzle": "~5.0"
And then just use the normal
$client = new GuzzleHttp\Client();
Just don't forget to to composer dump-autoload
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With