1. Go to this page and download the library: Download avalanche-development/talus 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/ */
avalanche-development / talus example snippets
$talus = new AvalancheDevelopment\Talus\Talus([..swagger..]);
function ($request, $response) {
$someParameter = $request->getAttribute('swagger')['params']['someParameter'];
}
$talus->addController('getThing', function ($request, $response) {
// get that thing
});
$talus->addController('getComplexThing', function ($request, $response) use ($db) {
return (new Controller($db))->getComplexThing($request, $response);
});