laravel-cms-core maintained by jeffersongoncalves
Laravel CMS Core
Pages, posts, categories, tags, comments, revisions, SEO metadata, i18n and sitemap generation. Backend-only: models, migrations, config — no routes, controllers or API.
Installation
composer require jeffersongoncalves/laravel-cms-core
php artisan vendor:publish --tag="cms-core-config"
php artisan migrate
Content models
Page— hierarchical (parent_id), translatabletitle/slug/body,draft/publishedstatus.Post— translatabletitle/slug/excerpt/body,draft/published/scheduledstatus, optionalauthor_id.
Both use Categorizable, Taggable, HasComments, HasRevisions and HasSeo concerns.
Taxonomy
Category (hierarchical) and Tag attach to any model via the Categorizable / Taggable traits (polymorphic pivot tables).
Comments
Comment is polymorphic (commentable) and threaded (parent_id), with pending/approved/spam status.
Revisions
HasRevisions snapshots the previous state of revisionable() fields (defaults to $fillable) before every update. Restore with:
$post->restoreRevision($revisionId);
SEO
HasSeo exposes a polymorphic seo relation (Seo model: translatable meta_title/meta_description, meta_image, canonical_url):
$post->fillSeo(['meta_title' => ['en' => 'Custom title']]);
i18n
Translatable fields are powered by spatie/laravel-translatable. Configure available locales in config/cms-core.php.
Sitemap
php artisan cms:generate-sitemap
Writes sitemap.xml from published pages/posts, using the URL resolvers configured in config('cms-core.sitemap.resolvers') — override these from the host application once routes exist.