grahamcampbell / laravel-digitalocean Goto Github PK
View Code? Open in Web Editor NEWA DigitalOcean API bridge for Laravel
Home Page: https://gjcampbell.co.uk
License: MIT License
A DigitalOcean API bridge for Laravel
Home Page: https://gjcampbell.co.uk
License: MIT License
I am facing this issue:
composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.Problem 1
- The requested package graham-campbell/digitalocean could not be found in any version, there may be a typo in the package name.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion for more details.Read http://getcomposer.org/doc/articles/troubleshooting.md for further common problems.
composer.json
"require": {
"laravel/framework": "4.2.",
"graham-campbell/digitalocean": "~1.0",
"hashids/hashids": "1.0.0",
"jenssegers/agent": ""
},
$volume = DigitalOcean::volume()->getAll();
dd($volume);
[]
Is the volume method broke or is it different method to access this block storage data.
The package is not compatible with laravel 5.6.x
Problem 1
- Conclusion: don't install graham-campbell/digitalocean v4.0.1
- Conclusion: don't install graham-campbell/digitalocean v4.0.0
- Conclusion: remove laravel/framework v5.6.1
- Installation request for graham-campbell/digitalocean ^4.0 -> satisfiable by graham-campbell/digitalocean[4.0.x-dev, v4.0.0, v4.0.1].
- Conclusion: don't install laravel/framework v5.6.1
- graham-campbell/digitalocean 4.0.x-dev requires illuminate/support 5.1.*|5.2.*|5.3.*|5.4.*|5.5.* -> satisfiable by illuminate/support[5.1.x-dev, 5.2.x-dev, 5.3.x-dev, 5.4.x-dev, 5.5.x-dev, v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.30, v5.1.31, v5.1.41, v5.1.6, v5.1.8, v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7, v5.3.0, v5.3.16, v5.3.23, v5.3.4, v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.27, v5.4.36, v5.4.9, v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28, v5.5.33, v5.5.34].
- don't install illuminate/support 5.1.x-dev|don't install laravel/framework v5.6.1
- don't install illuminate/support 5.2.x-dev|don't install laravel/framework v5.6.1
- don't install illuminate/support 5.3.x-dev|don't install laravel/framework v5.6.1
- don't install illuminate/support 5.4.x-dev|don't install laravel/framework v5.6.1
- don't install illuminate/support 5.5.x-dev|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.1.1|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.1.13|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.1.16|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.1.2|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.1.20|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.1.22|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.1.25|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.1.28|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.1.30|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.1.31|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.1.41|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.1.6|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.1.8|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.2.0|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.2.19|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.2.21|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.2.24|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.2.25|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.2.26|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.2.27|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.2.28|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.2.31|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.2.32|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.2.37|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.2.43|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.2.45|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.2.6|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.2.7|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.3.0|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.3.16|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.3.23|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.3.4|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.4.0|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.4.13|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.4.17|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.4.19|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.4.27|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.4.36|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.4.9|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.5.0|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.5.16|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.5.17|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.5.2|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.5.28|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.5.33|don't install laravel/framework v5.6.1
- don't install illuminate/support v5.5.34|don't install laravel/framework v5.6.1
- Installation request for laravel/framework (locked at v5.6.1, required as 5.6.*) -> satisfiable by laravel/framework[v5.6.1].
when I try and run (using Laravel 5)
php artisan publish:config graham-campbell/digitalocean
I get an error:
exception 'BadMethodCallException' with message 'Call to undefined method [package]' in /home/vagrant/code/l5try/vendor/laravel/framework/src/Illuminate/Support/ServiceProvider.php:140
Stack trace:
I'm just trying to confirm if this is something I did wrong or if it's because L5 is still in flux.
Thanks
Got this installed and setup - updated my digitalocean.php config file with my tokens.
Running any command e.g.
DigitalOcean::connection('main')->region()->getAll();
Results in:
FatalErrorException in GuzzleHttpAdapter.php line 135:
Call to a member function getBody() on null
I am using guzzlehttp.
Token is correct if I run a DO API call manually via command line. I am running the site locally on XAMPP (no SSL)
It would be great if you (or someone else more knowledgable than myself) could add in the ability to pass UserData on new droplet creation.
This would likely need some conditional checking before running the call as UserData is only available on selected OSs in certain locations. More at https://developers.digitalocean.com/#create-a-new-droplet
Hi,
I installed the package as per the instructions with guzzlehttp. I have put my DO token in config/digitalocean.php but no matter which connection I try to use, I always get Connection {connection_name} is not configured.
Please guide me as to where am I going wrong.
Thanks!
I have the bridge working beautifully with my static token setting as described in your setup documentation (using guzzle5). Everything works as expected but I would like to be able to set the token 'on the fly' if you will.
Can you explain how I can override the token?
Hi There
With this package could I save files in a DO Volume ?
Thanks
"graham-campbell/digitalocean": "^5.1",
"guzzlehttp/guzzle": "^6.3",
"kriswallsmith/buzz": "^0.17.2"
when calling any function for example DigitalOcean::size()->getAll();
Issue with C:\xampp\htdocs\front\myadmin\vendor\toin0u\digitalocean-v2\src\Adapter\GuzzleHttpAdapter.php
Line 132: $body = (string) $this->response->getBody();
Any ideas
Hi,
When can we expect laravel 10 support, at the moment I am unable to upgrade since this package requires graham-campbell/manager ^4.7 which requires illuminate/support ^5.5 || ^6.0 || ^7.0 || ^8.0 || ^9.0 and there is a version conflict here.
When attempting to update, I get the following:
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- illuminate/support[v5.6.0, ..., 5.8.x-dev] require php ^7.1.3 -> your php version (8.2.1) does not satisfy that requirement.
- illuminate/support[v6.0.0, ..., v6.19.1] require php ^7.2 -> your php version (8.2.1) does not satisfy that requirement.
- illuminate/support[v7.0.0, ..., v7.28.4] require php ^7.2.5 -> your php version (8.2.1) does not satisfy that requirement.
- illuminate/support[v8.0.0, ..., v8.11.2] require php ^7.3 -> your php version (8.2.1) does not satisfy that requirement.
- Root composer.json requires graham-campbell/digitalocean ^9.0 -> satisfiable by graham-campbell/digitalocean[v9.0.0, 9.0.x-dev].
- Conclusion: don't install laravel/framework v10.0.1 (conflict analysis result)
- Conclusion: don't install laravel/framework v10.0.2 (conflict analysis result)
- Conclusion: don't install laravel/framework v10.0.3 (conflict analysis result)
- graham-campbell/digitalocean[v9.0.0, ..., 9.0.x-dev] require graham-campbell/manager ^4.7 -> satisfiable by graham-campbell/manager[v4.7.0, 4.7.x-dev].
- Conclusion: don't install laravel/framework v10.0.0 (conflict analysis result)
- graham-campbell/manager[v4.7.0, ..., 4.7.x-dev] require illuminate/support ^5.5 || ^6.0 || ^7.0 || ^8.0 || ^9.0 -> satisfiable by illuminate/support[v5.5.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev, v9.0.0-beta.1, ..., 9.x-dev].
- Only one of these can be installed: illuminate/support[v5.5.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev, v9.0.0-beta.1, ..., 9.x-dev, v10.0.0, ..., 10.x-dev], laravel/framework[v10.0.0, ..., 10.x-dev]. laravel/framework replaces illuminate/support and thus cannot coexist with it.
- Root composer.json requires laravel/framework ^10.0 -> satisfiable by laravel/framework[v10.0.0, ..., 10.x-dev].
hi there. i installed the ide-helper and tried stuff like that:
https://stackoverflow.com/a/51849199/1092858
but i am not able to make phpstorm recognize commands like this:
DigitalOcean::droplet()->getAll()
"droplet" and all other commands are unknown.
any idea ?
thanks!
Hi there.
Is there any way to change "per_page" parameter for droplets list?
As I understand method getAll() doesn't allow this
public function getAll(?string $tag = null)
{
$droplets = $this->get('droplets', null === $tag ? [] : ['tag_name' => $tag]);
return \array_map(function ($droplet) {
return new DropletEntity($droplet);
}, $droplets->droplets);
}
DO docs says that "per_page" default value is 20, but I have more then 20 droplets, so I can't get them all.
Probably a non-issue but I'm running through the guide to get this setup
composer.json file:
"graham-campbell/digitalocean": "^3.2",
"guzzlehttp/guzzle": "^6.0",
When I run a composer update in the /vendor/ folder I get guzzlehttp and graham-campbell folders as expcted. However when I run php artisan vendor:publish it doesn't generate the digitalocean.php file
Running XAMPP on a fresh install on Laravel Boilerplate (http://laravel-boilerplate.com/)
Hey,
I was hope you could give me some pointers on how to get this working? So far I have go this installed and added a token. How do I say list the droplets on my account or see if its even corrected to my the API successfully?
Cheers.
Isn't there a method for getting just a single droplet for the specific ID?
Like:
public function power($droplet_id) {
dd(DigitalOcean::droplet($droplet_id));
return redirect()->back();
}
Is there any information that explaines what this package is used for? I don't know what 'bridge to' means...
So far I have this put in a InitializeDO
method. Not sure if it's the right way but it works just fine. Correct me if there's a better way to set the API token dynamically.
$this->adapter = new Adapters\ConnectionFactory();
$config = [
'driver' => 'guzzlehttp',
'token' => Auth::user()->do_api_token
];
$this->adapter->make($config);
$this->dof = new DigitalOceanFactory($this->adapter);
$this->dof->make($config);
$this->do = $this->dof->make($config);
The problem is that I can't access the user(Auth::user()
) in the consturctor of the controller, so I'm calling InitializeDO
in each one of my methods(index, show, edit, etc.). I don't think this is the best approach.
And here comes my question, how can I write this, so it's called just once and working with $this->do afterwards?
I have created a snapshot of my droplet and I want to create a new droplet with the same snapshot, how do I do it?
Thanks
Hi Graham
I have been trying set TTL on the domain record create and update methods but no luck.
The toin0u library did not state it either
// return the DomainRecord entity 123 of the domain 'baz.dk' updated with new-name, new-data, priority 1, port 2, weight 3, flags 0, tag issue (name, data, priority, port, weight, flags and tag are nullable)
$updated = $domainRecord->update('baz.dk', 123, 'new-name', 'new-data', 1, 2, 3, 0, 'issue');
kindly assist
Hi,
When I am trying to call the index function I've got this error returned:
FatalThrowableError in GuzzleHttpAdapter.php line 133:
Call to a member function getBody() on null
My functions:
public function __construct(DigitalOceanManager $digitalocean)
{
$this->digitalocean = $digitalocean;
}
public function index()
{
dd($this->digitalocean->droplet()->getAll());
}
Can someone help me please?
Support Project Resources API
Is this package support cloud config?
If yes, how to use it?
About cloud config: https://blog.digitalocean.com/automating-application-deployments-with-user-data/
Thanks, looking forward
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.