Scribe is a professional blogging and content management package for the Anchor Framework. It provides a robust foundation for building feature-rich blogs with categories, tags, comments, and built-in SEO controls.
- Fluent Post Building: Expressive API for creating, updating, and scheduling posts.
- Taxonomies: Nested Categories and flat Tags for organized content.
- SEO & Social Metadata: Built-in support for Meta Titles, Descriptions, and Open Graph tags.
- Publishing Workflows: Drafts, Scheduled, and Published statuses.
- Analytics: Track post views and engagement trends.
- Defensive Integration: Gracefully works with or without optional packages like
AuditandMedia.
Scribe is a package that requires installation before use.
php dock package:install Scribe --packagesThis command will:
- Publish the
scribe.phpconfiguration file. - Run the migration for Scribe tables.
- Register the
ScribeServiceProvider.
Use the Scribe facade to build a new post programmatically.
use Scribe\Scribe;
$post = Scribe::post()
->title('The Future of Agentic Coding')
->content('Content goes here...')
->excerpt('A brief summary of the post.')
->category(5)
->tags([1, 2, 8])
->seo([
'title' => 'Agentic Coding | Anchor Framework',
'description' => 'Learn how AI agents are transforming software development.',
])
->status('published')
->create();// Find by slug
$post = Scribe::findPost('the-future-of-agentic-coding');
// Find by refid
$post = Scribe::findPostByRefId('pst_abc123');You can schedule posts for future publication using the schedule method.
use Scribe\Scribe;
use Helpers\DateTimeHelper;
$post = Scribe::post()
->title('Upcoming Feature Announcement')
->content('Stay tuned...')
->status('scheduled')
->publishedAt(DateTimeHelper::now()->addDays(7))
->create();Scribe supports hierarchical categories. Use the CategoryBuilder for fluent creation.
use Scribe\Scribe;
$category = Scribe::category()
->name('Technology')
->description('Latest in tech.')
->create();
// Create a sub-category
$subCategory = Scribe::category()
->name('AI')
->parent($category)
->create();// Find by slug
$category = Scribe::findCategory('technology');
// Find by refid
$category = Scribe::findCategoryByRefId('cat_xyz789');Scribe includes a simple comment system that can be moderated.
use Scribe\Scribe;
$comment = Scribe::addComment($post, [
'content' => 'Great article!'
], userId: 1);If you don't manually set SEO meta, Scribe can generate it for you.
use Scribe\Scribe;
$meta = Scribe::generateSeoMeta($post);Track engagement over time for specific posts.
use Scribe\Scribe;
// Record a view
Scribe::recordView($post, $userId, $sessionId);
// Get view counts for the last 30 days
// Returns: [['date' => '2026-01-01', 'count' => 10], ...]
$trends = Scribe::analytics()->getPostTrends($post, days: 30);
// Get popular posts
// Returns: [[Post Model], [Post Model], ...]
$topPosts = Scribe::analytics()->getTopPosts(limit: 5);- Media: Use the
Mediafacade to handle featured images and post assets viaattachMedia(). - Audit: Automatically logs publishing and scheduling events if installed.
- Link: Generate signed URLs for private or early-access post previews.