afea/filament-blog

Blog module for the Afea Filament CMS package ecosystem: blog posts, categories, tags with SEO, media and polymorphic forms.

Maintainers

Package info

github.com/AfeaSoftware/filament-blog

pkg:composer/afea/filament-blog

Statistics

Installs: 1

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.0 2026-04-21 10:48 UTC

This package is auto-updated.

Last update: 2026-04-21 11:57:28 UTC


README

Blog module for the Afea Filament CMS package ecosystem.

Ships:

  • BlogPost, Category, Tag models (SEO + polymorphic forms + media thumbnail via Spatie)
  • Filament v4 resources for each model
  • BlogPlugin — register in your AdminPanelProvider to mount the resources
  • Public-facing routes registered per the configured routing strategy (slug / resource / localized)
  • BlogController + overridable Blade views
  • afea:install:blog — Laravel Prompts installer

Installation

composer require afea/filament-blog
php artisan afea:install:blog

Then in your AdminPanelProvider:

->plugin(\Afea\Cms\Blog\Filament\BlogPlugin::make())

Config highlights

return [
    'models' => [
        'blog_post' => \Afea\Cms\Blog\Models\BlogPost::class,
        'category' => \Afea\Cms\Blog\Models\Category::class,
        'tag' => \Afea\Cms\Blog\Models\Tag::class,
    ],
    'user_model' => \App\Models\User::class,
    'routing_strategy' => env('AFEA_BLOG_ROUTING_STRATEGY', 'resource'),
    'prefix' => env('AFEA_BLOG_PREFIX', 'blog'),
    'views' => [
        'index' => 'afea-blog::index',
        'show' => 'afea-blog::show',
    ],
    'media' => [
        'disk' => env('AFEA_BLOG_MEDIA_DISK', null),
        'thumbnail_collection' => 'blog-posts/thumbnails',
        'preview_size' => [300, 300],
    ],
];

Three common scenarios

1. Switch routing strategy without re-installing

Set AFEA_BLOG_ROUTING_STRATEGY=slug in .env and your posts now live at /{slug}. No migrations, no code changes.

2. Override the BlogPost model

// app/Models/BlogPost.php
namespace App\Models;

class BlogPost extends \Afea\Cms\Blog\Models\BlogPost
{
    public function scopeFeatured($query)
    {
        return $query->where('is_active', true)->whereNotNull('published_at');
    }
}
// config/afea-blog.php
'models' => ['blog_post' => \App\Models\BlogPost::class],

3. Use your own Blade theme

php artisan vendor:publish --tag=afea-blog-views

Edit resources/views/vendor/afea-blog/show.blade.php freely. Point afea-blog.views.* at your own templates for more control.