1. Go to this page and download the library: Download stratify/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/ */
stratify / framework example snippets
use Stratify\ErrorHandlerModule\ErrorHandlerMiddleware;
use Stratify\Framework\Application;
use Zend\Diactoros\Response\HtmlResponse;
use function Stratify\Framework\pipe;
use function Stratify\Framework\router;
::class,
// The application's router
// See https://github.com/stratifyphp/router for more details
router([
// Routes
'/' => function () {
return new HtmlResponse('Welcome!');
},
'/about' => function () {
return new HtmlResponse('More information about us');
},
]),
]);
// List of packages containing PHP-DI config to
return [
...
'twig.paths' => [
// Configure the directory using the alias `app`
// In this example views are stored in the `res/views/` directory
// You can then use the `@app/...` notation to render or