Skip to content
Available for new work
Pages in Blog

GuidePremium

Choosing a front end for CoullWorks Blog for Laravel

The four ways the public blog can be drawn (Blade, Livewire, Inertia, headless), how to choose, switch between them and where each one is configured.

Updated 16 November 2026Back to the package pageBuy

The package decides what a reader sees with one setting, coullworks-blog.frontend. The admin, the data and the JSON API are the same whichever you pick. Only the public pages change.

The four choices#

The blog home page as the Blade front end draws it: a wide lead post, a category filter and a grid of cards

The blog home page at 1440 pixels wide: the blog name and Home and Search links on top, a row of category pills, a wide lead post, then a three-column grid of cards. Every HTML front end draws this page.

Set the value in config/coullworks-blog.php. Publish the file first with php artisan vendor:publish --tag=cwb-config if you have not. An unknown value throws an InvalidArgumentException, so a typo cannot silently fall back.

ValueWhat it isPick it when
blade (default)Server-rendered Blade pages in a Tailwind or Bootstrap view set. Nothing to build.You want a blog that works the moment it is installed, or your site is Blade.
livewireThe same Blade pages plus live search suggestions, load more and in-place pagination. Needs livewire/livewire.Your site already runs Livewire and you want the search box and listings to update without a reload.
inertiaReact or Vue page and block components published into your application. Your application owns the controller and routes.Your site is an Inertia single-page app and the blog must look and behave like the rest of it.
noneHeadless. Draws nothing. Read the JSON:API under api/blog/v1.A separate front end (a Next.js site, an app) draws the blog from the API.

The Blade pages are described in Blade front end, Livewire in Livewire front end and Inertia in Inertia front end. Colours, type and the article layout are shared by all of them and live in Tokens and theming. Where each page's view lives and what it receives is in Views you can override.

Headless#

With 'frontend' => 'none' no Blade, Livewire or Inertia route is registered and no page is drawn. The admin is still installed, and the sitemap and the feeds are still served. Keep coullworks-blog.api.enabled true (the default) and read the typed JSON:API:

bash
curl -H 'Accept: application/vnd.api+json' https://example.com/api/blog/v1/posts

Responses carry the cache headers set by coullworks-blog.api.cache. There is no Tailwind or Bootstrap choice for a headless blog, because nothing is drawn. A single post read carries template (the layout the post uses) and, for a post that uses the rail layout, a rail object holding the first takeaways block, relatedPostIds and authorId. A list read carries template on each post. Ask for include=nav to receive meta.nav, the category filter items (id, name, slug, url); a plain list leaves it out so it stays cheap. A /search answer carries a snippet on each post: a list of {text, match} segments. Draw a segment with match: true as emphasis and everything else as plain text. The endpoints are in the API guide and the REST reference.

Switching from one front end to another#

  1. Change coullworks-blog.frontend in config/coullworks-blog.php.
  2. Do the install step for the new front end (nothing for Blade, composer require livewire/livewire for Livewire, php artisan blog:inertia:install for Inertia).
  3. Clear the config cache with php artisan config:clear (or config:cache again in production).
  4. Open the blog home page and one article. Posts, categories, tags, redirects and settings are untouched: they belong to the blog, not to the front end.

Which file holds which setting#

Each front end can be configured in its own file, and every key can also go inside config/coullworks-blog.php.

Front endPublish the file withWritten toArray inside coullworks-blog.php
Bladephp artisan vendor:publish --tag=cwb-blade-configconfig/coullworks-blog-blade.phpblade
Livewirephp artisan vendor:publish --tag=cwb-livewire-configconfig/coullworks-blog-livewire.phplivewire
Inertiaphp artisan vendor:publish --tag=coullworks-blog-inertia-configconfig/coullworks-blog-inertia.phpinertia

The package reads, in order, its own defaults, then the published file, then the array inside config/coullworks-blog.php. The last one wins. Use whichever you prefer; both work.

Interface text#

The public pages use 69 interface strings (namespace coullworks-blog::ui) and the Livewire components use 7 more (coullworks-blog::livewire). Only English ships. To translate or reword them, publish the files with php artisan vendor:publish --tag=cwb-blade-lang and edit them under lang/vendor/coullworks-blog. Blog content (titles, text) is translated in the admin, not here. See Multi blog and languages.

Available for new work

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