Skip to content

coopTilleuls/easyadmin-mercure-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Jun 8, 2023
412e227 Â· Jun 8, 2023

History

50 Commits
Jun 5, 2023
Jun 2, 2023
May 24, 2023
Jun 2, 2023
Jun 2, 2023
Jun 2, 2023
Jun 2, 2023
Jun 8, 2023
May 24, 2023
Jun 7, 2023
May 24, 2023
Jun 2, 2023
May 24, 2023
Jun 2, 2023
Jun 7, 2023
Jun 6, 2023
Jun 6, 2023
Jun 5, 2023
Jun 2, 2023
May 24, 2023
Jun 2, 2023
Jun 2, 2023

Repository files navigation

EasyAdmin/Mercure demo

Features

  • While I edit an entity which gets updated on the server by another user, I get a notification and a button for updating the page I'm looking at.
  • While I am looking at an entity list, if a an entity on the page gets updated on the server by another user, I get a notification, a button for updating the page I'm looking at and the outdated entity gets highlighted.

This demo application has been generated from the MicroSymfony template.

Requirements

Installation & first run 🚀

Your 8000 and 50943 ports must be free for the Symfony CLI web server and Mercure.

composer install
make start

Then open http://127.0.0.1:8000/

Reset

To reinitialize the database you can run:

make db-init

Run the tests

To check the PHPUnit tests, you can run:

make test

Stop the Docker containers and the Symfony web server

make stop

Manual update

You can also manually emit notifications in your application check out AppController:

  $topic = $this->adminUrlGenerator->setController(Article::class)
          ->unsetAllExcept('crudControllerFqcn')->generateUrl();
  $update = new Update(
      $topic,
      (string) json_encode(['id' => 1]),
  );

Of course you should rely on an actual article instance in this case.

Todo

To try/test

Stack

Dev-tools

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published