dev-master
9999999-devVestaCP API for Laravel.
MIT
The Requires
v0.3.0
0.3.0.0VestaCP API for Laravel.
MIT
The Requires
v0.2.1
0.2.1.0VestaCP API for Laravel.
MIT
The Requires
VestaCP API for Laravel.
VestaCP API for Laravel., (*1)
, (*2)
Install using Composer, (*3)
$ composer require woenel/laravesta "^0.3"
Publish the config file named laravesta.php
so you can set the hostname, username, password and other configuration., (*4)
$ php artisan vendor:publish --provider="Woenel\Laravesta\LaravestaServiceProvider"
use Laravesta; $res = Laravesta::execute('v-add-user', [ 'arg1' => 'user01', // username 'arg2' => 'p@ssw0rd', // password 'arg3' => 'user01@example.com', // email 'arg4' => 'default', // package 'arg5' => 'Ronnel', // first name 'arg6' => 'Martinez' // last name ]); if($res->getCode() == 0) { return "User account has been successfuly created"; } return "Query returned error code: " . $res->getCode();
getCode()
returns code instead of data., (*5)
See https://vestacp.com/docs/api/#return_codes for returned code meaning., (*6)
use Laravesta; $res = Laravesta::execute('v-list-user', [ 'arg1' => 'user01', // username 'arg2' => 'json' // format ]); return json_decode($res->getData(), true);
If the command (like v-list-user
) is expected to return data aside from code, you can use getData()
to get it., (*7)
For more commands (like v-add-user
and v-list-user
), visit VestaCP CLI Documentation at https://vestacp.com/docs/cli/., (*8)
VestaCP API for Laravel.
MIT
VestaCP API for Laravel.
MIT
VestaCP API for Laravel.
MIT