Skip to content
Available for new work
Pages in Blog

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#

RouteNameWhat it does
GET {cwbPath} (sitemap.xml, feed/{locale}.xml, feed/{locale}/category/{slug}.xml)cwb.xmlCore: sitemap and RSS feeds for every host, whatever the front end.
GET /vendor/coullworks-blog/{file}cwb.assetsBlade: package stylesheet/script, no session or cookie.
GET (fallback) any public blog pagecwb.bladeBlade/Livewire: page controller matching Core URL patterns (index, post, category, tag, author, archive, search, preview, page N); 404 and 429 pages.
POST {path}/commentscwb.comments.submitSubmit 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-tokencwb.comments.form-tokenReturns {time_token, idempotency_key}; throttle cwb-comments-token.
GET {path}/posts/{id}/commentscwb.comments.threadReturns {data, count, meta}; throttle cwb-comments-read.
GET {path}/comments/unsubscribe/{id}cwb.comments.unsubscribeSigned URL confirm page.
POST {path}/comments/unsubscribe/{id}cwb.comments.unsubscribe.postSigned URL: stop reply notifications.
POST {path}/viewscwb.analytics.viewsCount 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#

AliasClassNotes
cwb.blogsrc/Core/Http/Middleware/ResolveBlog.phpRegistered by BlogCoreServiceProvider::registerMiddleware.
cwb.licensedsrc/Core/Http/Middleware/EnsureLicensed.phpRegistered by BlogCoreServiceProvider::registerMiddleware.
cwb.redirectssrc/Core/Http/Middleware/ResolveRedirects.phpRegistered by BlogCoreServiceProvider::registerMiddleware.
cwb.previewsrc/Core/Http/Middleware/ReadPreviewToken.phpRegistered by BlogCoreServiceProvider::registerMiddleware.
ResolveRedirects as global and group middlewaresrc/Core/BlogCoreServiceProvider.phpActs only on a 404, once per request.

Caching, locks and rate limiters#

ItemWhat 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 cacheCache::remember for feeds.max_age seconds.
Redirect rules cache1 hour per blog, invalidated on rule change.
Category index object cacheCategoryIndex memo.
HTTP caching of public pagesETag + Cache-Control: max_age=blade.max_age (0, revalidates), s-maxage=blade.s_maxage (600); cookies stripped from public pages by StripCookiesFromPublicPages.
Analytics lists cachepopular_cache_seconds / related_cache_seconds (300); counter keys in AnalyticsCache; dedup via Cache::add (analytics.dedup_minutes).
API cacheapi.cache max_age 60, s_maxage 300, ttl 300; flushed by FlushApiCaches listener.
Inertia props cacheinertia.cache_ttl seconds (300), keyed by host+variant+URI.
LocksCache::lock cwb-ai-queue:{blog} (60s), cwb-ai-spend:{blog} (15s).
Rate limitersblog-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 memoSettings 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.

TagPublishes
cwb-configconfig/coullworks-blog.php.
cwb-migrationsCore migrations.
cwb-blocks-migrationsBlocks migrations.
cwb-comments-migrationsComments migrations.
cwb-analytics-migrationsAnalytics migrations.
cwb-import-migrationsImport migrations.
cwb-ai-migrationsAI migrations.
cwb-ai-promptsAI prompt files to resources/ai/prompts.
cwb-ai-viewsAI views.
cwb-ai-inertiaAI Inertia stub to resources/js/vendor/coullworks-ai.
cwb-analytics-viewsAnalytics views.
cwb-analytics-inertiaAnalytics Inertia stub.
cwb-comments-viewsComments views.
cwb-comments-inertiaComments Inertia stub.
cwb-blade-views-tailwindTailwind view set to resources/views/vendor/coullworks-blog.
cwb-blade-views-bootstrapBootstrap view set.
cwb-blade-tokenstokens.css and blog.css.
cwb-blade-adaptersadapter-tailwind.css / adapter-bootstrap.css.
cwb-blade-jsblog.js and highlight.js.
cwb-blade-assets-tailwindcompiled dist/blog-tailwind.css + js.
cwb-blade-assets-bootstrapcompiled dist/blog-bootstrap.css + js.
cwb-blade-langLanguage files.
cwb-blade-configconfig/coullworks-blog-blade.php.
cwb-livewire-configconfig/coullworks-blog-livewire.php.
coullworks-blog-inertia-configconfig/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.

Available for new work

UK based · PHP · Python · JS · TS. Every first call is free.