mirror of
https://github.com/symfony/recipes-contrib.git
synced 2026-03-24 00:32:17 +01:00
Add zenstruck/messenger-monitor-bundle recipe (#1780)
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
zenstruck_messenger_monitor:
|
||||
storage:
|
||||
orm:
|
||||
entity_class: App\Entity\ProcessedMessage
|
||||
9
zenstruck/messenger-monitor-bundle/0.5/manifest.json
Normal file
9
zenstruck/messenger-monitor-bundle/0.5/manifest.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"bundles": {
|
||||
"Zenstruck\\Messenger\\Monitor\\ZenstruckMessengerMonitorBundle": ["all"]
|
||||
},
|
||||
"copy-from-recipe": {
|
||||
"config/": "%CONFIG_DIR%/",
|
||||
"src/": "%SRC_DIR%/"
|
||||
}
|
||||
}
|
||||
9
zenstruck/messenger-monitor-bundle/0.5/post-install.txt
Normal file
9
zenstruck/messenger-monitor-bundle/0.5/post-install.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
* You're almost ready to use zenstruck/messenger-monitor-bundle!
|
||||
|
||||
* First, create a migration with <comment>symfony console make:migration</comment>
|
||||
and run it with <comment>symfony console doctrine:migrations:migrate</comment>.
|
||||
|
||||
* Visit <comment>/admin/messenger</comment> as a user with <comment>ROLE_ADMIN</comment>
|
||||
to see the Dashboard UI.
|
||||
|
||||
* <fg=blue>Read</> the documentation at <comment>https://github.com/zenstruck/messenger-monitor-bundle</>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\Admin;
|
||||
|
||||
use Symfony\Component\Routing\Attribute\Route;
|
||||
use Symfony\Component\Security\Http\Attribute\IsGranted;
|
||||
use Zenstruck\Messenger\Monitor\Controller\MessengerMonitorController as BaseMessengerMonitorController;
|
||||
|
||||
#[Route('/admin/messenger')]
|
||||
#[IsGranted('ROLE_ADMIN')]
|
||||
class MessengerMonitorController extends BaseMessengerMonitorController
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use Zenstruck\Messenger\Monitor\History\Model\ProcessedMessage as BaseProcessedMessage;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(readOnly: true)]
|
||||
#[ORM\Table('messenger_processed_messages')]
|
||||
class ProcessedMessage extends BaseProcessedMessage
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
public function id(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user