forked from Somnia/SomniaRooms
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:
@@ -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
@@ -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}
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user