- Can I integrate Sulu with Laravel instead of Symfony? If so, how?
- Sulu is built on Symfony, not Laravel, so direct Laravel integration isn’t supported. However, you can use Sulu’s REST/GraphQL APIs to decouple it from Laravel. For example, deploy Sulu as a separate Symfony microservice and consume its API endpoints in Laravel via Guzzle or HTTP clients. Alternatively, use Symfony’s HTTP client bundle to interact with Sulu’s routes.
- What Laravel versions or packages are compatible with Sulu’s Symfony-based architecture?
- Sulu itself doesn’t support Laravel natively, but you can bridge the two by leveraging Symfony’s interoperability with Laravel’s ecosystem. For example, use Laravel’s `symfony/http-client` to call Sulu’s API or share Doctrine entities between projects. Laravel 10+ works best for API-driven integrations, as it supports modern Symfony components like HTTP clients and UX.
- How do I install Sulu as a standalone CMS without Symfony knowledge?
- Sulu requires Symfony expertise due to its bundle-based architecture. Start with the [sulu/skeleton](https://github.com/sulu/skeleton) template, which includes a preconfigured Symfony setup. Follow the official [installation guide](https://docs.sulu.io/en/3.0/getting-started/installation.html) to set up dependencies (PHP 8.2+, Symfony 6.4–7.4) and run `composer install`. Avoid forking core bundles; extend functionality via custom bundles instead.
- What’s the best way to migrate from Sulu 2.x to 3.x in a Laravel-adjacent project?
- Migrating from Sulu 2.x to 3.x involves breaking changes like Doctrine 3 upgrades and route entity refactoring. Use the [official upgrade guide](https://docs.sulu.io/en/3.0/upgrade.html) and test migrations locally with `sulu:build` and `doctrine:migrations:migrate`. For Laravel integrations, ensure your API consumers handle changes in Sulu’s response formats (e.g., GraphQL schema updates). Plan downtime for database migrations.
- How do I customize content types (e.g., add fields to a page) in Sulu for a Laravel frontend?
- Customize content types via Sulu’s bundle system. Create a custom bundle extending `SuluCoreBundle` and define new content types in YAML/XML configurations (e.g., `Resources/config/content-types/page.yml`). For Laravel frontends, expose these via Sulu’s API or use Twig templates if rendering server-side. Test changes in Sulu’s admin panel before API consumption.
- Does Sulu support multi-language sites, and how does it handle translations in Laravel?
- Sulu natively supports multi-language sites via Webspace and locale configurations. Translations are stored in the database (e.g., `Translation` entities) and can be fetched via API endpoints like `/api/admin/translations`. In Laravel, cache translations in Redis or use a package like `spatie/laravel-translatable` to sync Sulu’s translations with Laravel models.
- What are the performance implications of Sulu’s workspaces and versioning for high-traffic sites?
- Workspaces and versioning add database overhead due to entity duplication (e.g., `PageVersion` tables). Optimize with Doctrine caching (e.g., `SecondLevelCache`) and query optimizations like indexing `FileVersionMeta`. For high traffic, use read replicas or sharding. Monitor API response times under load, especially for content-heavy endpoints like `/api/admin/pages`.
- Can I use Sulu’s admin panel with a custom frontend framework (e.g., React/Vue) instead of Twig?
- Yes, Sulu’s admin panel is built with Vue.js and can be customized or replaced entirely. Extend the admin bundle by overriding Vue components or replacing the entire frontend with a custom React/Vue app that consumes Sulu’s API. Document your API endpoints (REST/GraphQL) and use tools like Swagger for frontend integration. Avoid modifying Sulu’s core admin bundle directly.
- Are there alternatives to Sulu for Laravel that offer similar multi-language/multi-portal features?
- For Laravel, consider **October CMS** (Laravel-based, multi-language) or **Craft CMS** (headless-capable). For Symfony-like alternatives, **Sylius** (e-commerce) or **API Platform** (API-first) can be paired with Laravel via APIs. Sulu’s strength lies in its Symfony bundle ecosystem and admin UI; if you need tighter Laravel integration, evaluate **Laravel Nova** (for simpler admin panels) or **FilamentPHP** (for customizable UIs).
- How do I secure Sulu’s API endpoints when used by a Laravel application?
- Secure Sulu’s API with Symfony’s built-in security (e.g., `security.yaml` roles) and Laravel’s API authentication. Use JWT or OAuth2 via bundles like `lexik/jwt-authentication-bundle`. Restrict API access to trusted IPs or Laravel’s internal network. For GraphQL, add query depth limits and rate limiting. Audit Sulu’s `security.yml` for default permissions and override them in your custom bundle.