PHP code example of marko / security
1. Go to this page and download the library: Download marko/security 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/ */
marko / security example snippets
use Marko\Routing\Attributes\Post;
use Marko\Routing\Attributes\WithoutMiddleware;
use Marko\Security\Middleware\CsrfMiddleware;
class WebhookController
{
#[Post('/webhooks/stripe')]
#[WithoutMiddleware(CsrfMiddleware::class)]
public function receive(): Response
{
return new Response('Received');
}
}