PHP code example of php-skir / client
1. Go to this page and download the library: Download php-skir/client library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
php-skir / client example snippets
use Skir\Admin\GetUserRequest;
use Skir\Admin\SkirRpcClient;
use Skir\Client\SkirClient as TransportSkirClient;
$client = new SkirRpcClient(app(TransportSkirClient::class));
$user = $client->getUser(new GetUserRequest(userId: 42));
echo $user->name;
bash
composer --save-dev skir skir-php-generator
bash
npx skir gen
npx skir-php-generator configure-composer
composer dump-autoload
php artisan vendor:publish --tag=skir-client-config