redaxo/core
REDAXO core is a PHP-based CMS and framework for building and managing websites. It provides the admin backend, addon system, content structure, and essential services like routing, media handling, and templating—forming the foundation for REDAXO projects.
rex_addon) mirrors Laravel’s service providers and package structure, enabling seamless modular integration. The CMS’s event system (rex_event) can be mapped to Laravel’s event system via custom listeners, reducing boilerplate for cross-stack communication.redaxo_articles, laravel_users) to avoid conflicts. Laravel’s migrations can extend REDAXO tables without full schema replacement.rex() functions) may require refactoring to Laravel’s DI container for maintainability. Use facades or service providers to wrap REDAXO’s procedural functions.rex_api) integrates cleanly with Laravel’s HTTP client or API resources.rex_user) can be synchronized with Laravel’s auth() via:
Authenticatable to fetch users from REDAXO’s database.copy-webpack-plugin to include REDAXO’s assets in Laravel’s build.asset() helper.rex_cache) should leverage Laravel’s cache drivers (Redis, Memcached) via a facade wrapper to avoid duplication. Example:
// In a Laravel service provider
Cache::extend('redaxo', function () {
return Cache::repository(new RedaxoCacheStore());
});
users, sessions) risks data corruption without a phased migration. Use Doctrine Migrations or custom scripts to handle schema changes incrementally.debugbar or Blackfire to identify and optimize hotpaths.rex_media) may lack Laravel compatibility. Wrapper classes or composer packages (e.g., laravel-redaxo/media) can bridge this gap but require upfront development.rex() calls to service providers)?rex_api) to fetch content, then render via Blade templates or a SPA (Vue/React).routes/api.php) to proxy REDAXO endpoints or extend them with business logic.public function show(Article $article) {
$redaxoData = Http::get('http://redaxo/api/articles/' . $article->id);
return view('articles.show', [
'article' => $article,
'redaxoContent' => $redaxoData->json(),
]);
}
class RedaxoArticle extends Model {
protected $table = 'redaxo_articles';
public function getContentAttribute() {
return $this->content; // Custom logic
}
}
Phase 1: API Decoupling (Low Risk)
rex_api).ArticleController@index fetches from /api/articles).$articles = Http::get('http://redaxo/api/articles')->json();
Phase 2: Shared Auth & Services (Medium Risk)
users table:
// In a Laravel Artisan command
$redaxoUsers = DB::connection('redaxo')->select('SELECT * FROM rex_user');
foreach ($redaxoUsers as $user) {
User::create([
'name' => $user->username,
'email' => $user->email,
// Map REDAXO roles to Laravel permissions
]);
}
Authenticatable to fetch users from REDAXO’s database:
class RedaxoGuard extends Guard {
public function user() {
$user = DB::connection('redaxo')->table('rex_user')->find($this->id);
return new User($user);
}
}
rex_media):
// In a service provider
$this->app->singleton('redaxo.media', function () {
return new RedaxoMediaService();
});
Phase 3: Database Integration (High Risk)
Schema
How can I help you explore Laravel packages today?