Hello,
I've create a filter to check the rights to access to the controllers. If the rights are not sufficient, I want to display a message. The messages are managed with a class, shared with Services: multiple messages can be generated before display.
The filter :
if (count($testRights) == 0) {
$message = service('MessagePpci');
$message->set(_("You don't have the necessary rights"), true);
return redirect()->to(site_url());
}
When I display the content of the message, the text generated by the filter don't exists : it seems to me that the class Message was reinitialized or not shared.
Have you an idea?
Thanks,
Éric Q.