- Can I use REDAXO’s core package directly in a Laravel project without a full rewrite?
- Yes, but with limitations. REDAXO’s procedural architecture clashes with Laravel’s OOP design, so you’d need a hybrid approach—using Laravel’s routing, auth, and Blade while proxying requests to REDAXO’s backend. This requires custom middleware and service container bridges, especially for database and session sharing.
- What Laravel versions support REDAXO’s PHP 8.3+ requirement?
- Laravel 11+ officially supports PHP 8.3, so REDAXO’s core package will work, but you’ll need to pin Symfony dependencies (REDAXO uses v7.4) to avoid conflicts with Laravel’s Symfony 6.x. Use Composer’s `replace` or `conflict` directives to mitigate version mismatches.
- How do I handle REDAXO’s rex_users authentication in Laravel?
- You have two options: 1) Build a Laravel guard adapter to wrap REDAXO’s `rex_users` system, or 2) replace REDAXO’s auth entirely with Laravel’s built-in authentication. The first is complex but preserves existing user data; the second requires rewriting middleware and session logic.
- Will REDAXO’s Smarty-like templating (rex_template) work with Laravel Blade?
- Not natively, but you can bridge them. Use a package like `smarty-bridge` to compile Smarty templates to Blade or rewrite REDAXO’s views manually. For hybrid projects, keep REDAXO’s backend templates and use Blade for frontend routes to avoid duplication.
- How do I migrate REDAXO’s database schema to Laravel’s Eloquent?
- Create Laravel migrations to adapt REDAXO’s custom tables (e.g., `rex_media`, `rex_content`) or build a dual-database layer. For complex schemas, export data via CSV or use a custom migration tool to transform REDAXO’s procedural queries into Eloquent queries.
- Are there Composer dependency conflicts between REDAXO and Laravel?
- Yes, primarily with Symfony components (e.g., `symfony/http-foundation`). REDAXO uses Symfony 7.4, while Laravel uses 6.x. Mitigate this by adding `replace` directives in `composer.json` or using vendor patching. Always test in isolation before full integration.
- Can I use REDAXO’s event system (EPs) in Laravel?
- Indirectly. REDAXO’s event points (EPs) are less standardized than Laravel’s events. You’d need to create Laravel event listeners that trigger REDAXO’s EPs via service container hooks or middleware. This requires mapping REDAXO’s imperative hooks to Laravel’s declarative event system.
- What’s the best approach for routing in a Laravel-REDAXO hybrid project?
- For frontend routes, redirect to Laravel’s router. For REDAXO’s backend, use Laravel middleware to proxy requests to REDAXO’s `index.php`. This avoids rewriting REDAXO’s routing logic but requires careful URL mapping to prevent conflicts.
- How do I test a Laravel-REDAXO integration?
- Focus on boundary layers: unit test the auth adapter, route proxy, and database abstraction. Use Laravel’s testing tools to mock REDAXO dependencies (e.g., `rex_sql`). For integration tests, simulate hybrid workflows like user login or content rendering across both systems.
- What alternatives exist if I need a Laravel-compatible CMS?
- Consider Laravel-native CMS packages like `laravel-backpack/crud` (for admin panels), `orchid/software` (modular), or `spatie/laravel-medialibrary` (media management). For full CMS features, evaluate `filament/filament` (admin) or `statamic/starter-kit` (flat-file). These avoid REDAXO’s integration challenges entirely.