Easyadmin - Pretty URLs and FrankenPHP Workers.

- Configure Easyadmin "Pretty URLs"
- Activate FrankenPHP Workers (as it should work fine now with Easyadmin Pretty URLs).
This commit is contained in:
2025-06-02 22:03:22 +02:00
parent 89eef326a7
commit 25ff16a9db
4 changed files with 8 additions and 2 deletions
+1
View File
@@ -15,6 +15,7 @@ services:
- ./var/log:/somnia_logs
environment:
FRANKENPHP_WORKER_CONFIG: watch
FRANKENPHP_USEWORKER: none # <-- Disable FrankenPHP Workers for development as don't reload on code changes.
MERCURE_EXTRA_DIRECTIVES: demo
# See https://xdebug.org/docs/all_settings#mode
XDEBUG_MODE: "${XDEBUG_MODE:-off}"
+1 -1
View File
@@ -14,7 +14,7 @@ services:
MERCURE_URL: ${CADDY_MERCURE_URL:-http://php/.well-known/mercure}
MERCURE_PUBLIC_URL: https://${SERVER_NAME:-localhost}/.well-known/mercure
MERCURE_JWT_SECRET: ${CADDY_MERCURE_JWT_SECRET:-!ChangeThisMercureHubJWTSecretKey!}
FRANKENPHP_USEWORKER: none # <-- Disable FrankenPHP Workers as don't work well with current EasyAdmin version. This is fixed on newer versions.
FRANKENPHP_USEWORKER: worker # <-- Disable FrankenPHP Workers as don't work well with current EasyAdmin version. This is fixed on newer versions.
# The two next lines can be removed after initial installation
SYMFONY_VERSION: ${SYMFONY_VERSION:-}
STABILITY: ${STABILITY:-stable}
+4
View File
@@ -0,0 +1,4 @@
# config/routes/easyadmin.yaml
easyadmin:
resource: .
type: easyadmin.routes
@@ -9,15 +9,16 @@ use App\Entity\FareTable;
use App\Entity\RoomCategory;
use App\Entity\RoomFare;
use App\Entity\User;
use EasyCorp\Bundle\EasyAdminBundle\Attribute\AdminDashboard;
use EasyCorp\Bundle\EasyAdminBundle\Config\Dashboard;
use EasyCorp\Bundle\EasyAdminBundle\Config\MenuItem;
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractDashboardController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
#[AdminDashboard(routePath: '/admin', routeName: 'admin')]
class SomniaDashboardController extends AbstractDashboardController
{
#[Route('/admin', name: 'admin')]
public function index(): Response
{
return $this->render('admin/somniaDashboard.html.twig');