GuidePremium
The Inertia front end for CoullWorks Blog for Laravel
Install the React or Vue pages with Tailwind or Bootstrap, wire the generated controller and routes, link the stylesheet, and understand the Index and Post pages and every Inertia config key.
Updated 16 November 2026Back to the package pageBuy
The Inertia front end gives you the blog as pages and components inside your own Inertia single-page app, in React or Vue, with Tailwind or Bootstrap 5. The package publishes the pages as stubs into your application, so you own them and can change them. It never imports an Inertia class itself. Your application owns the one controller that calls Inertia.
Install#

The home page. The Inertia Index page is built to draw this same page, and its markup and styling come from the same tokens. The gallery has no capture taken from a React or Vue run, so this is the Blade capture.
Before you start, install inertiajs/inertia-laravel and the React (@inertiajs/react) or Vue (@inertiajs/vue3) adapter in your application. The package does not install them.
- Set
'frontend' => 'inertia'inconfig/coullworks-blog.php. Run the installer with the framework and the style:
bashphp artisan blog:inertia:install react tailwindThe first argument is
react(the default) orvue. The second istailwind(the default) orbootstrap. Any other value stops with an error.- The command publishes the page, component, block and type stubs to
resources/js/blog, the three token files toresources/js/blog/styles, and the compiled stylesheet topublic/vendor/coullworks-blog/blog-tailwind.css(orblog-bootstrap.css). It also writesapp/Http/Controllers/Blog/InertiaBlogController.phpandroutes/blog-inertia.php, then prints the steps still to do. Do those steps:
- Load the routes: add
require base_path('routes/blog-inertia.php');toroutes/web.php. - Let your Inertia page resolver find the pages under
resources/js/blog/pages. Page names start with thepage_prefix(blog/pages/by default), for exampleblog/pages/Index. - Link the stylesheet in your root Blade view:
<link rel="stylesheet" href="{{ asset('vendor/coullworks-blog/blog-tailwind.css') }}">. The pages are then styled with no build step.
- Load the routes: add
- Open the blog address.
| Option | What it does |
|---|---|
--routes-only | Writes only the controller and route files; the stubs are not published |
--force | Overwrites files that already exist. Without it, an existing controller is kept and the command says so |
--domain=domain=prefix | Adds a blog that answers on its own domain with its own path prefix. Repeat it for several. Blogs with a domain are also read from the database |
--controller-path= | Where to write the controller |
--routes-path= | Where to write the routes |
Run the command again with --force after you change coullworks-blog.urls.patterns or the prefix, and again after you update the package, to refresh the published stylesheet.
To build the styles with your own pipeline instead of linking the compiled file, import the published files after Tailwind in your main CSS: @import "tailwindcss"; then @import "../js/blog/styles/tokens.css"; @import "../js/blog/styles/adapter.css"; @import "../js/blog/styles/blog.css"; @source "../js/blog";. For Bootstrap, load Bootstrap 5.3 CSS first and then those three files. Dark mode follows data-bs-theme. No Sass and no Bootstrap JavaScript are needed.
The Index page#

What the Index page draws: the category pills, the lead post and the grid of cards. This is the Blade capture of the same page.
resources/js/blog/pages/Index.tsx (or Index.vue) draws the blog home page. The generated controller calls it with the properties built by the package's IndexProps. The same props shape serves the Category, Tag, Author and Archive pages, each of which has its own stub next to it. The main props are:
| Prop | Holds |
|---|---|
blog | The blog name, locale, enabled locales, the index, search and feed links and the consent cookie name |
locale, kind, title, intro | The language, which listing this is, the heading and an optional intro |
posts, featured | The cards for the page and the lead cards |
pagination | Page, last page, total, size, previous and next links and the page links |
seo, crumbs, extras | Head tags, breadcrumbs and module extras (reading time, comments, related) |
mode | grid or list. Absent: the grid |
sidebar | The sidebar widgets. Absent: no sidebar |
nav | The category filter. Absent: no filter |
Props your controller does not send fall back to the plain layout: no sidebar, no filter, the grid. A Search page, a Not found page and the other stubs follow the same pattern. The TypeScript types for every prop are in resources/js/blog/types/props.ts.
The Post page#

The top of an article: the breadcrumb trail, the GUIDES kicker, the title, the standfirst, the byline with reading time, then the hero image. The Post page draws this same page; this is the Blade capture.
Post.tsx (or Post.vue) draws an article. Its props add:
| Prop | Holds |
|---|---|
post, blocks | The post's fields and its block list, drawn by the block components in resources/js/blog/blocks |
authors, categories, tags | The byline, the category kicker and the tag list |
neighbours | The previous and next posts |
template | article (no rail) or rail (the contents rail beside the text) |
rail | The first key takeaways block and the related posts, for the rail |
readingMinutes | The reading time in minutes, or null |
alternates | The other-language versions, for hreflang |
preview | true when the page is a draft preview |
The article grid, the rail, the type tokens and the slots are the same as in Blade: see Tokens and theming. To place a module extra in the call-to-action slot, register it with registerExtra(type, Component, 'cta') from resources/js/blog/extras/registry.ts.
After you register a custom block type, regenerate the TypeScript types with php artisan blog:inertia:types.
The Inertia config#
Publish the file with php artisan vendor:publish --tag=coullworks-blog-inertia-config. It is written to config/coullworks-blog-inertia.php. The same keys can go in the inertia array inside config/coullworks-blog.php, which wins.
| Key | Default | What it changes |
|---|---|---|
prefix | blog | The URL prefix the route stub is generated with. A blog's own path prefix still decides at run time |
page_prefix | blog/pages/ | The root of the Inertia component names, relative to your page resolver |
preview_pattern | preview/{token} | The draft preview route, under the prefix. The token carries the post and the language |
middleware | ['web'] | Middleware added to every generated route |
featured_count | 1 | How many featured posts the index shows |
cache_ttl | 300 | Seconds a built props array is kept |
React or Vue#
The two sets have the same pages, components, blocks and props. The differences are the file type (.tsx or .vue) and the adapter. The Vue set has one extra component, CategoryTree, for the category sidebar widget. Class names for both are in resources/js/blog/lib/classes.ts. Both come in Tailwind and Bootstrap styles, which makes four stub sets in all.
Screenshots of the four Inertia sets#
Each set is captured on its own: React or Vue, with Tailwind or Bootstrap.
Inertia React Tailwind#

The Inertia React Tailwind listing on a 1440 px window.

The Inertia React Tailwind listing at 390 px: the category pills wrap and the posts stack in one column.

The Inertia React Tailwind article page at 1440 px.

The Inertia React Tailwind article page at 390 px. The contents sit in a collapsed On this page control.

The Inertia React Tailwind search page showing the one result for "tent".

The Inertia React Tailwind Figure lightbox open. The same dialog is used in every front end.
Inertia React Bootstrap#

The Inertia React Bootstrap listing on a 1440 px window.

The Inertia React Bootstrap listing at 390 px: the category pills wrap and the posts stack in one column.

The Inertia React Bootstrap article page at 1440 px.

The Inertia React Bootstrap article page at 390 px. The contents sit in a collapsed On this page control.

The Inertia React Bootstrap search page showing the one result for "tent".

The Inertia React Bootstrap Figure lightbox open. The same dialog is used in every front end.
Inertia Vue Tailwind#

The Inertia Vue Tailwind listing on a 1440 px window.

The Inertia Vue Tailwind listing at 390 px: the category pills wrap and the posts stack in one column.

The Inertia Vue Tailwind article page at 1440 px.

The Inertia Vue Tailwind article page at 390 px. The contents sit in a collapsed On this page control.

The Inertia Vue Tailwind search page showing the one result for "tent".

The Inertia Vue Tailwind Figure lightbox open. The same dialog is used in every front end.
Inertia Vue Bootstrap#

The Inertia Vue Bootstrap listing on a 1440 px window.

The Inertia Vue Bootstrap listing at 390 px: the category pills wrap and the posts stack in one column.

The Inertia Vue Bootstrap article page at 1440 px.

The Inertia Vue Bootstrap article page at 390 px. The contents sit in a collapsed On this page control.

The Inertia Vue Bootstrap search page showing the one result for "tent".

The Inertia Vue Bootstrap Figure lightbox open. The same dialog is used in every front end.







