rjcodes/rjcms
WordPress-style CMS for Laravel 12/13: admin panel at /admin, visual BREAD content/field builder, media library, drag-and-drop menus, roles & permissions, site settings, and a public blog. Install with composer + rjcms:install.
Installation:
composer require rjcodes/rjcms
php artisan rjcms:install --admin-email="admin@example.com" --admin-password="password"
First Use Case:
/admin and log in with the credentials you set./admin – Familiar WordPress-style layout.Content Type Management:
Product) with fields like name, description, and price.Product to a Category).// Access content via Eloquent (auto-generated models)
$products = \App\Models\Product::with('category')->get();
@foreach($products as $product)
<h2>{{ $product->name }}</h2>
<p>{{ $product->description }}</p>
@endforeach
Media Handling:
featured_image field).$imageUrl = $product->featured_image->url; // Assuming `featured_image` is a media field
Menus and Navigation:
{!! menu('main') !!}
MenuRenderer service.Permissions and Roles:
admin, editor) and permissions to users via the Users section.@can('update-posts')
<button>Edit Post</button>
@endcan
Site Settings:
$siteName = \RJCMS\Settings::get('site_name');
Frontend Integration:
rjcms::content directive to fetch content types:
@php
$posts = \RJCMS\Facades\Content::type('post')->get();
@endphp
php artisan vendor:publish --tag=rjcms-views
Custom Fields:
app/Providers/RJCMSServiceProvider.php:
public function boot()
{
RJCMS::extend('custom_field', \App\Fields\CustomField::class);
}
API Endpoints:
Route::apiResource('posts', \App\Http\Controllers\PostController::class);
Livewire Components:
Field Type Limitations:
ClassNotFoundException when trying to use it in the builder.Media Storage:
storage/app/public. Ensure your filesystems.php config is set up correctly:
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
],
php artisan storage:link to create the symlink for public access.Permission Conflicts:
admin, editor). Mismatched permissions may cause access issues.Idempotent Installer:
config/rjcms.php before re-installing.Livewire Dependencies:
composer.json includes:
"livewire/livewire": "^4.0"
Log Viewer:
php artisan log:view) to debug issues with content types, media uploads, or permissions.Database Inspection:
rjcms_content_types, rjcms_fields, and rjcms_media tables for misconfigurations. Example:
SELECT * FROM rjcms_content_types WHERE slug = 'post';
Common Errors:
/admin: Ensure the admin middleware group is properly configured in app/Http/Kernel.php.Demo Content:
--demo flag during installation to explore pre-built content types and fields:
php artisan rjcms:install --demo
Custom Admin Routes:
routes/admin.php (published by the installer). Example:
Route::get('/reports', [ReportController::class, 'index'])->middleware('can:view-reports');
Performance:
Localization:
resources/lang/vendor/rjcms to add translations.Backup Strategy:
rjcms_content_types, rjcms_fields, and rjcms_media tables, as these store your schema and assets.Extending the Builder:
color_picker), create a class in app/Fields and register it in the service provider:
RJCMS::extend('color_picker', \App\Fields\ColorPickerField::class);
RJCMS\Contracts\Field.Testing:
$response = $this->actingAs($adminUser)->get('/admin');
$response->assertStatus(200);
How can I help you explore Laravel packages today?