ReferencePremium
CoullWorks Blog for Laravel routes, caching and publish tags
The web routes, middleware aliases, caches, locks, rate limiters and publish tags the package registers.
Updated 16 November 2026Back to the package pageBuy
Web routes#
| Route | Name | What it does |
|---|---|---|
GET {cwbPath} (sitemap.xml, feed/{locale}.xml, feed/{locale}/category/{slug}.xml) | cwb.xml | Core: sitemap and RSS feeds for every host, whatever the front end. |
GET /vendor/coullworks-blog/{file} | cwb.assets | Blade: package stylesheet/script, no session or cookie. |
GET (fallback) any public blog page | cwb.blade | Blade/Livewire: page controller matching Core URL patterns (index, post, category, tag, author, archive, search, preview, page N); 404 and 429 pages. |
POST {path}/comments | cwb.comments.submit | Submit a comment: post_id, parent_id, name, email, body, notify_on_reply, idempotency_key, time_token, verifier_token, locale + honeypot cwb_website; 422 on invalid parent. |
GET {path}/comments/form-token | cwb.comments.form-token | Returns {time_token, idempotency_key}; throttle cwb-comments-token. |
GET {path}/posts/{id}/comments | cwb.comments.thread | Returns {data, count, meta}; throttle cwb-comments-read. |
GET {path}/comments/unsubscribe/{id} | cwb.comments.unsubscribe | Signed URL confirm page. |
POST {path}/comments/unsubscribe/{id} | cwb.comments.unsubscribe.post | Signed URL: stop reply notifications. |
POST {path}/views | cwb.analytics.views | Count a post view: post_id (required int), locale; bots/duplicates ignored (dedup_minutes, throttle 120); queued RecordPostView. |
GET route stub: blog index/post/category/tag/author/archive/search (+ locale variants) | cwb.inertia.* | Inertia: written into the host by blog:inertia:install (routes/blog-inertia.php + controller). |
Middleware#
| Alias | Class | Notes |
|---|---|---|
cwb.blog | src/Core/Http/Middleware/ResolveBlog.php | Registered by BlogCoreServiceProvider::registerMiddleware. |
cwb.licensed | src/Core/Http/Middleware/EnsureLicensed.php | Registered by BlogCoreServiceProvider::registerMiddleware. |
cwb.redirects | src/Core/Http/Middleware/ResolveRedirects.php | Registered by BlogCoreServiceProvider::registerMiddleware. |
cwb.preview | src/Core/Http/Middleware/ReadPreviewToken.php | Registered by BlogCoreServiceProvider::registerMiddleware. |
ResolveRedirects as global and group middleware | src/Core/BlogCoreServiceProvider.php | Acts only on a 404, once per request. |
Caching, locks and rate limiters#
| Item | What it does |
|---|---|
| Cache tags (generation counters) | CacheTags: blog, post, category, tag, author, settings, feed, sitemap, redirects counters folded into keys; works on every cache store (no taggable store needed). |
| Feed cache | Cache::remember for feeds.max_age seconds. |
| Redirect rules cache | 1 hour per blog, invalidated on rule change. |
| Category index object cache | CategoryIndex memo. |
| HTTP caching of public pages | ETag + Cache-Control: max_age=blade.max_age (0, revalidates), s-maxage=blade.s_maxage (600); cookies stripped from public pages by StripCookiesFromPublicPages. |
| Analytics lists cache | popular_cache_seconds / related_cache_seconds (300); counter keys in AnalyticsCache; dedup via Cache::add (analytics.dedup_minutes). |
| API cache | api.cache max_age 60, s_maxage 300, ttl 300; flushed by FlushApiCaches listener. |
| Inertia props cache | inertia.cache_ttl seconds (300), keyed by host+variant+URI. |
| Locks | Cache::lock cwb-ai-queue:{blog} (60s), cwb-ai-spend:{blog} (15s). |
| Rate limiters | blog-web-search, cwb-xml, blog-api, blog-api-search, blog-api-write, cwb-comments-read, cwb-comments-token, cwb-comments-unsubscribe, cwb-analytics-views, blog-livewire-search, blog-livewire-more: need a cache store with atomic increments. |
| Settings memo | Settings rows memoised per request; reset on queue job processing and Octane events. |
Publish tags#
Run php artisan vendor:publish --tag=<tag> to copy these files into your application.
| Tag | Publishes |
|---|---|
cwb-config | config/coullworks-blog.php. |
cwb-migrations | Core migrations. |
cwb-blocks-migrations | Blocks migrations. |
cwb-comments-migrations | Comments migrations. |
cwb-analytics-migrations | Analytics migrations. |
cwb-import-migrations | Import migrations. |
cwb-ai-migrations | AI migrations. |
cwb-ai-prompts | AI prompt files to resources/ai/prompts. |
cwb-ai-views | AI views. |
cwb-ai-inertia | AI Inertia stub to resources/js/vendor/coullworks-ai. |
cwb-analytics-views | Analytics views. |
cwb-analytics-inertia | Analytics Inertia stub. |
cwb-comments-views | Comments views. |
cwb-comments-inertia | Comments Inertia stub. |
cwb-blade-views-tailwind | Tailwind view set to resources/views/vendor/coullworks-blog. |
cwb-blade-views-bootstrap | Bootstrap view set. |
cwb-blade-tokens | tokens.css and blog.css. |
cwb-blade-adapters | adapter-tailwind.css / adapter-bootstrap.css. |
cwb-blade-js | blog.js and highlight.js. |
cwb-blade-assets-tailwind | compiled dist/blog-tailwind.css + js. |
cwb-blade-assets-bootstrap | compiled dist/blog-bootstrap.css + js. |
cwb-blade-lang | Language files. |
cwb-blade-config | config/coullworks-blog-blade.php. |
cwb-livewire-config | config/coullworks-blog-livewire.php. |
coullworks-blog-inertia-config | config/coullworks-blog-inertia.php. |
vendor:publish Livewire views (tailwind and bootstrap tags) | Two tags publish the Livewire views: cwb-livewire-views-tailwind and cwb-livewire-views-bootstrap. Each copies its view set plus the shared views into resources/views/vendor/coullworks-blog-livewire. |







