PHP code example of hands-on-ekino-php / your-client

1. Go to this page and download the library: Download hands-on-ekino-php/your-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/ */

    

hands-on-ekino-php / your-client example snippets


return [
    // ...other bundles
    HandsOnEkinoPhp\YourClient\Bridge\Symfony\HandsOnEkinoPhpBundle::class => ['all' => true],
];



namespace App\Action;

use HandsOnEkinoPhp\YourClient\Client\TodosClient;
use Symfony\Component\HttpFoundation\JsonResponse;

class MyAction
{
    public function __invoke(TodosClient $todosClient): JsonResponse
    {
        // The client is automatically injected thanks to Symfony's autowiring
        return $todosClient->getTodos();
    }
}