diff --git a/composer.json b/composer.json index 57fd2e9..208a19d 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ }, "autoload": { "psr-4": { - "Lextira\\PureFTPdClient\\": "src/" + "Lextira\\PureFTPdManager\\": "src/" } }, "config": { @@ -23,7 +23,7 @@ "extra": { "laravel": { "providers": [ - "Lextira\\PureFTPdClient\\Providers\\PureFTPdServiceProvider" + "Lextira\\PureFTPdManager\\Providers\\PureFTPdServiceProvider" ] } } diff --git a/readme.md b/readme.md index 030f969..c3b5118 100644 --- a/readme.md +++ b/readme.md @@ -1,11 +1,11 @@ -## pureftp-client -Laravel client package for +## pureftpd-manager +Laravel client package that allows to manage FTP accounts for ### Installation - Run ``` -composer require lextira/pureftpd-client +composer require lextira/pureftpd-manager ``` - Set environment variables LEXTIRA_PUREFTPD_HOST and LEXTIRA_PUREFTPD_AUTH_KEY for configuration @@ -18,7 +18,7 @@ composer require lextira/pureftpd-client namespace App\Services\Backend\Providers; ... -use Lextira\PureFTPdClient\Providers\PureFTPdServiceProvider; +use Lextira\PureFTPdManager\Providers\PureFTPdServiceProvider; /** * Class BackendServiceProvider @@ -43,20 +43,20 @@ class BackendServiceProvider extends ServiceProvider ``` -- Inject PureFTPdClient wherever you want +- Inject PureFTPdManager wherever you want ``` accounts()->getPage($request->input('page', 1)); + return $ftpManager->accounts()->getPage($request->input('page', 1)); } } ``` @@ -65,7 +65,7 @@ class GetAccountsJob extends Job { ``` accounts()->get($id); +$ftpManager->accounts()->get($id); /* stdClass Object @@ -86,7 +86,7 @@ stdClass Object ) */ -$ftpClient->accounts()->getPage($pageNumber); +$ftpManager->accounts()->getPage($pageNumber); /* stdClass Object @@ -127,7 +127,7 @@ stdClass Object */ try { - $ftpClient->accounts()->create([ + $ftpManager->accounts()->create([ 'login' => 'my_login', 'password' => 'pass', 'relative_dir' => 'dir', @@ -165,7 +165,7 @@ stdClass Object */ try { - $ftpClient->accounts()->update($id, [ + $ftpManager->accounts()->update($id, [ 'login' => 'my_login, 'password' => 'pass', 'relative_dir' => 'dir', @@ -202,7 +202,7 @@ stdClass Object ) */ -$ftpClient->domains()->getPage($pageNumber); +$ftpManager->domains()->getPage($pageNumber); /* stdClass Object @@ -238,7 +238,7 @@ stdClass Object ) */ -$ftpClient->health()->check(); +$ftpManager->health()->check(); /* stdClass Object diff --git a/src/models/Account.php b/src/models/Account.php index c364953..2500337 100644 --- a/src/models/Account.php +++ b/src/models/Account.php @@ -1,5 +1,5 @@ 'Lextira/PureFTPdClient/1.0', + 'User-Agent' => 'Lextira/PureFTPdManager/1.0', 'Accept' => 'application/json', ]; diff --git a/src/models/Domain.php b/src/models/Domain.php index e534f76..f4f68fc 100644 --- a/src/models/Domain.php +++ b/src/models/Domain.php @@ -1,5 +1,5 @@