dominservice / laravel-cms
Laravel CMS Backend
Requires
- php: >=8.1
- ext-gd: *
- astrotomic/laravel-translatable: ^11.13
- dominservice/laravel-config: ^2.2
- dominservice/laravel-media-kit: ^1.0
- kalnoy/nestedset: ^6.0
- laravel/framework: ^9|^10|^11|^12|^13
- livewire/livewire: ^3.0
Requires (Dev)
- orchestra/testbench: ^7.0|^8.0|^9.0|^10.0|^11.0
- dev-main
- 4.4.1
- 4.4.0
- 4.3.1
- 4.3.0
- 4.2.5
- 4.2.4
- 4.2.3
- 4.2.2
- 4.2.1
- 4.2.0
- 4.1.10
- 4.1.9
- 4.1.8
- 4.1.7
- 4.1.6
- 4.1.5
- 4.1.4
- 4.1.3
- 4.1.2
- 4.1.1
- 4.1.0
- 4.0.0
- 3.7.3
- 3.7.2
- 3.7.1
- 3.7.0
- 3.6.0
- 3.5.3
- 3.5.2
- 3.5.1
- 3.5.0
- 3.4.5
- 3.4.4
- 3.4.3
- 3.4.2
- 3.4.1
- 3.4.0
- 3.3.12
- 3.3.11
- 3.3.10
- 3.3.9
- 3.3.8
- 3.3.7
- 3.3.6
- 3.3.5
- 3.3.4
- 3.3.3
- 3.3.2
- 3.3.1
- 3.3.0
- 3.2.2
- 3.2.1
- 3.2.0
- 3.1.1
- 3.1.0
- 3.0.0
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4.2
- 2.4.1
- 2.4.0
- 2.3.0
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.1
- 2.1.0
- 2.0.1
- 2.0.0
- 1.1.1
- 1.1.0
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
This package is auto-updated.
Last update: 2026-04-10 16:00:03 UTC
README
dominservice/laravel-cms
Reusable Laravel CMS for multilingual pages, blocks, categories and media-driven content structures.
What This Package Solves
dominservice/laravel-cms is designed for projects that need a practical CMS layer on top of Laravel, without locking the application into a closed website builder.
It gives you:
- multilingual
pageandblockcontent models, - configurable admin sections for content and categories,
- config-driven settings dashboards,
- Media Kit integration for images and video slots,
- publishable views that can be adapted to any admin theme,
- a structure that can start as a company website and grow into a larger CRM, ERP or portal.
Key Features
- multilingual contents and categories,
- nested category trees,
- configurable admin routes, middleware, layout mode and route names,
- block-oriented homepage and static page management via
cms.default_pages.*, - configurable block schemas stored in
meta, - repeater fields for cards, FAQ items and similar structured content,
- Editor.js profile support for rich text fields,
- media slots for desktop/mobile image and video handling,
- direct integration with
dominservice/laravel-media-kit, including reusable library assets, - publishable views and language files.
Installation
composer require dominservice/laravel-cms dominservice/laravel-media-kit php artisan vendor:publish --provider="Dominservice\LaravelCms\ServiceProvider" --tag=config php artisan vendor:publish --provider="Dominservice\LaravelCms\ServiceProvider" --tag=views php artisan vendor:publish --provider="Dominservice\LaravelCms\ServiceProvider" --tag=lang php artisan vendor:publish --provider="Dominservice\LaravelCms\ServiceProvider" --tag=migrations php artisan vendor:publish --provider="Dominservice\MediaKit\MediaKitServiceProvider" --tag=mediakit-config php artisan vendor:publish --provider="Dominservice\MediaKit\MediaKitServiceProvider" --tag=mediakit-migrations php artisan migrate
Admin Panel
The package includes a configurable admin panel for content, categories and settings.
Main configuration lives in config/cms.php:
cms.admin.enabledcms.admin.prefixcms.admin.route_name_prefixcms.admin.middlewarecms.admin.layout.modecms.admin.layout.viewcms.admin.layout.sectioncms.admin.layout.component
Layout integration supports three modes:
package: use package-provided layout,extends: render inside your existing Blade layout,component: render inside a Blade component.
This makes it easy to keep package logic inside the package, while styling the UI in the host project through published views.
Content Types, Blocks and Schemas
The package supports configurable content and category types. You can keep simple arrays in config or point to your own enum classes.
'types' => [ 'content' => \App\Enums\CmsContentType::class, 'category' => \App\Enums\CmsCategoryType::class, ],
For block-based pages you can define sections in config and assign form fields, media slots and schema fields per section or block.
Typical use cases:
- homepage sections such as
hero,about,services,faq,cta, - static pages with configurable visual variants,
- reusable block types for landing pages and company websites.
Schema Fields in meta
Block-specific configuration is stored in meta, so the host project can render frontend components using its own Blade views and CSS.
Supported patterns include:
- simple scalar fields,
- translatable fields,
- visual variants,
- repeater fields,
- structured button/link configuration,
- Editor.js rich text payloads.
Media Integration
The package uses dominservice/laravel-media-kit as the media layer.
Current integration supports:
- desktop and mobile images,
- desktop and mobile video posters,
- image and video slots in CMS forms,
- importing already uploaded assets from the shared media library,
- keeping CMS views publishable, so the host project can replace the UI without changing package logic.
Media Picker Configuration
'admin' => [ 'content' => [ 'media_picker' => [ 'enabled' => true, 'browse_route' => 'admin.media.index', 'label' => 'Biblioteka mediów', 'helper' => 'Wybierz istniejący asset z biblioteki lub wgraj nowy plik.', ], ], ],
The package exposes backend support for selecting library asset UUIDs. The host project can publish and extend the form views to provide a custom picker UX.
Editor.js Profiles
The package supports Editor.js configuration profiles so projects can choose a richer or more compact toolset per field.
Example:
'admin' => [ 'content' => [ 'editorjs' => [ 'profiles' => [ 'default' => [ 'tools' => ['paragraph', 'header', 'list', 'quote'], ], 'compact' => [ 'tools' => ['paragraph', 'list'], ], ], 'field_profiles' => [ 'description' => 'default', 'faq_items.answer' => 'compact', ], ], ], ],
Settings Dashboard
The settings dashboard is driven by configuration and can sync UUID-based assignments back into structured config arrays.
Useful for:
- assigning homepage page UUIDs,
- assigning homepage blocks,
- syncing public menu structures,
- storing multilingual meta fields,
- managing config-driven CMS sections without writing extra controllers.
Views and Overrides
The package is meant to be published and themed.
php artisan vendor:publish --provider="Dominservice\LaravelCms\ServiceProvider" --tag=views php artisan vendor:publish --provider="Dominservice\LaravelCms\ServiceProvider" --tag=lang
Recommended approach:
- keep routes, controllers, Livewire classes and storage logic in the package,
- publish package views,
- override the views in the host project to match the chosen admin theme.
This keeps the CMS reusable between projects while still allowing tailored UI.
Extensibility
The package is intentionally config-first and open to project-level extension.
You can extend it through:
- your own enum classes for content and category types,
- additional block schemas in app config,
- published views,
- custom frontend renderers,
- custom permissions and middleware on admin routes,
- custom settings panels and sync indexes.
Upgrade Notes
When upgrading existing projects:
- merge new config keys instead of overwriting the whole file,
- republish views only if you want the new default UI,
- republish migrations only when needed,
- verify
media-kitconfig and routes if you use the shared media library.
License
MIT
