Laravel Cms
#Laravel CMS
Laravel CMS — pages, posts, categories, tags, comments, revisions, SEO metadata, media library and navigation menus.
Backend-only: Eloquent models, migrations, config and contracts. No routes/controllers/API — the admin UI is provided by the separate filament-cms package.
#Features
- 📄 Pages and posts with categories and tags
- 💬 Comments with moderation
- 🕓 Content revisions
- 🔍 SEO metadata per model
- 🖼️ Media library integration (
spatie/laravel-medialibrary) - 🧭 Navigation menus and menu items
- 🗺️ Sitemap generation command
- 🌐 Translatable content (
spatie/laravel-translatable) - 🧩 Swap any model via config, bound through contracts
#Installation
You can install the package via composer:
composer require jeffersongoncalves/laravel-cms
Publish and run the migrations:
php artisan vendor:publish --tag="cms-migrations" php artisan migrate
Optionally publish the config files:
php artisan vendor:publish --tag="cms-config"
This publishes config/cms-core.php, config/cms-media.php and config/cms-menu.php, where you can override the model bindings used by each contract (PageContract, PostContract, CategoryContract, TagContract, CommentContract, RevisionContract, SeoContract, MenuContract, MenuItemContract).
#Usage
use JeffersonGoncalves\Cms\Models\Page; use JeffersonGoncalves\Cms\Models\Post; $page = Page::create([ 'title' => ['en' => 'About us'], 'slug' => 'about-us', 'content' => ['en' => '...'], ]); $post = Post::create([ 'title' => ['en' => 'Hello world'], 'slug' => 'hello-world', 'content' => ['en' => '...'], ]);
#Sitemap
Generate the sitemap with the bundled Artisan command:
php artisan cms:generate-sitemap
#Testing
composer test
#Changelog
Please see CHANGELOG for more information on what has changed recently.
#Contributing
Please see CONTRIBUTING for details.
#Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
#Credits
#License
The MIT License (MIT). Please see License File for more information.