PHP code example of kartenmacherei / cqrs-framework
1. Go to this page and download the library: Download kartenmacherei/cqrs-framework 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/ */
kartenmacherei / cqrs-framework example snippets
// create a request
$request = Request::fromSuperGlobals();
// create a new instance of the framework
$framework = Framework::createInstance();
// register a Request Route
$framework->registerPostRoute(new LoginRoute());
$framework->registerGetRoute(new WelcomeRoute());
// let the framework process the request
$response = $framework->run($request);
// send the response to the client
$response->flush();