- Can I use REDAXO as a headless CMS for Laravel’s frontend?
- Yes, but it requires a hybrid setup. Use Laravel for your frontend/APIs (e.g., Sanctum for auth) while redirecting admin tasks to REDAXO’s backend. Fetch content via REDAXO’s API addon or custom endpoints, but expect manual routing and session management between the two frameworks.
- How do I handle dependency conflicts between REDAXO (Symfony 7.4) and Laravel (Symfony 6.x/7.x)?
- Use Composer’s `replace` directive or vendor patching to isolate overlapping dependencies like `symfony/console`. Alternatively, create a custom wrapper service in Laravel to abstract REDAXO’s core classes, reducing direct dependency clashes.
- What’s the best way to integrate REDAXO’s database (raw SQL/active record) with Laravel’s Eloquent?
- Extend Laravel’s Eloquent models to override methods like `find()` and map them to REDAXO’s active record classes (e.g., `rex_article`). For complex queries, use a shared database schema with migrations or a read-replica setup to avoid conflicts.
- Does REDAXO support Laravel’s service container for dependency injection?
- Not natively, but you can wrap REDAXO’s core classes (e.g., `rex_*`) in Laravel service providers. For example, bind `rex_article` to a custom `ArticleService` that implements Laravel’s `ArticleRepository` interface for seamless DI.
- How do I translate REDAXO’s event hooks (EP_*) into Laravel events?
- Build a bridge service in a Laravel provider to listen for REDAXO’s hooks (e.g., `EP_ARTICLE_SAVE`) and dispatch Laravel events like `ArticleSaved`. Use closures or observer patterns to keep the translation logic clean and maintainable.
- Is REDAXO compatible with Laravel’s Blade templating system?
- No, REDAXO uses a Smarty-like template engine. For a hybrid setup, route `/admin` to REDAXO’s templates and `/api` or `/frontend` to Laravel’s Blade. Alternatively, cache REDAXO’s templates aggressively if you must serve them via Laravel.
- What Laravel versions does REDAXO support, and how do I ensure compatibility?
- REDAXO’s PHP 8.3 support aligns with Laravel 10/11. Pin REDAXO to PHP 8.3 in your `.php-version` file or Docker setup. Test thoroughly, as procedural/OOP-mixed code may introduce edge cases in Laravel’s stricter PSR-12 environment.
- Can I use REDAXO’s multilingual features with Laravel’s localization?
- Yes, but manually. REDAXO’s multilingual system (e.g., `rex_language`) can be exposed via API endpoints or wrapped in Laravel services. For seamless integration, consider syncing language tables between both systems or using a shared database.
- What are the performance implications of running REDAXO alongside Laravel?
- REDAXO’s Smarty templates may introduce overhead compared to Blade. Profile your setup and cache aggressively (e.g., Redis for templates, OPcache for PHP). Shared database queries or read-replicas can also mitigate performance gaps.
- Are there better alternatives to REDAXO for Laravel integration?
- If you need a Laravel-native solution, consider Statamic (headless CMS) or October CMS (full-stack). For lightweight content management, Laravel’s Filament or Nova plugins may suffice. REDAXO’s strength lies in its legacy flexibility, but it requires more effort to integrate.