1. Go to this page and download the library: Download mileschou/monoex 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/ */
mileschou / monoex example snippets
$app->singleton(RequestFactoryInterface::class, new \Laminas\Diactoros\RequestFactory());
$app->singleton(ResponseFactoryInterface::class, new \Laminas\Diactoros\ResponseFactory());
$app->singleton(StreamFactoryInterface::class, new \Laminas\Diactoros\StreamFactory());
$app->singleton(ClientInterface::class, function($app) {
return new \Symfony\Component\HttpClient\Psr18Client(
null,
$app->make(ResponseFactoryInterface::class),
$app->make(StreamFactoryInterface::class)
);
});