- Install component via composer
composer require caesar/security-message-bundle- Add component into
config/bundles.phpwith following content:
return [
//.............
Caesar\SecurityMessageBundle\SecurityMessageBundle::class => ['all' => true],
//.............
];- Add the configuration yaml into
config/routes/security_message.yamlwith following content:
security_message_bundle:
resource: '@SecurityMessageBundle/Controller/MessageController.php'
prefix: /
type: annotation-
Implement
Caesar/SecurityMessageBundle/Service/ClientInterface.php -
Add the configuration yaml into
config/packages/security_message.yamlwith following content:
security_message:
client: <Class that implemented ClientInterface>####Create new message: POST /message with
{
"message": "string",
"secondsLimit": 20,
"requestsLimit": 20
}####Get message GET /message/{id}