PHP code example of phillipsharring / handlr-framework
1. Go to this page and download the library: Download phillipsharring/handlr-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/ */
phillipsharring / handlr-framework example snippets
// routes.php
$router->group('/api', [CorsPipe::class, VerifyOriginPipe::class])
->through([StartSessionPipe::class, SessionAuthPipe::class, EnsureCsrfTokenPipe::class, VerifyCsrfTokenPipe::class])
->get('/auth/me', [GetAuthStatus::class])
->through([RequireAuthPipe::class])
->get('/items', [GetItemsList::class])
->post('/items', [PostCreateItem::class])
->end()
->end()
->end();