Skip to content
Available for new work
Pages in Blog

GuidePremium

The Livewire front end for CoullWorks Blog for Laravel

Switch the blog to Livewire for live search suggestions, load more and in-place pagination, with every Livewire config key and the two components explained.

Updated 16 November 2026Back to the package pageBuy

The Livewire front end is the Blade front end with two parts made live: the search box suggests posts as you type, and listings load more posts or change page without reloading. Everything else (the article, the layout, the tokens, the views) is the Blade set, so the article layouts, the rail, the sidebar, the category filter and the list layout all come with it.

Install and turn it on#

The home page the Livewire front end draws, captured from the Blade set

The home page. The Livewire front end draws the same page as Blade, so this is the Blade capture. What Livewire adds (live suggestions under the search box, Load more, in-place paging) happens in the browser and has no still capture in the gallery yet.

  1. Install Livewire: composer require livewire/livewire. The package works with Livewire 3 (with Filament 4) and Livewire 4 (with Filament 5). It is a suggestion, not a hard requirement, so Blade-only installs do not pull it in.
  2. Set 'frontend' => 'livewire' in config/coullworks-blog.php.
  3. Clear the config cache with php artisan config:clear.
  4. Open the blog and type two or more letters in the search box. Suggested posts appear under it.

If livewire/livewire is not installed, the package registers no Livewire component, so install it before you switch.

Styles and scripts#

Tailwind and Bootstrap work as they do for Blade: the default layout links the compiled stylesheet for the view set (blade.framework) and the Livewire components use that same set. See Blade front end.

When Livewire injects its own assets (its default), nothing more is needed. When you have turned injection off, the default layout prints Livewire's styles and scripts itself. If you use your own layout (blade.layout), put @livewireStyles in the head and @livewireScripts before the closing body tag.

On install the package replaces the four Blade components with Livewire versions, unless you mapped one yourself: blade.components.search becomes cwl::search, list becomes cwl::list, pagination becomes cwl::pagination and load_more becomes cwl::load-more.

The livewire config#

Publish it with php artisan vendor:publish --tag=cwb-livewire-config. It is written to config/coullworks-blog-livewire.php. The same keys can go in the livewire array inside config/coullworks-blog.php; that array wins over the file.

KeyDefaultAllowed valuesWhat it changes
suggestions51 to 10How many suggested posts the search box lists
debounce300millisecondsThe quiet time after the last keystroke before it asks for suggestions
search_limit30requests per minute per IPHow many suggestion requests one visitor may make. Past it the box shows a wait message and a Try again button
more_limit60requests per minute per IPThe same limit for Load more and page-change requests

The posts component#

A listing the posts component draws, captured from the Blade set

The grid of cards under the lead post is what the posts component draws. Load more and in-place paging are interactive and have no still capture yet.

The posts component draws the list of cards under a listing or a search result. The listing page passes it its settings, and you normally never place it yourself. Its inputs are locked, which means the browser cannot change them between updates:

InputMeaning
blogId, localeWhich blog and language the list belongs to
kindindex, category, tag, author, archive or search
entityIdThe category, tag or author id, when the kind needs one
year, monthThe archive period
termThe search term, for search
modenumbered (default) shows page links; loadmore shows a Load more button. Anything else is treated as numbered
baseUrl, queryWhere page links point, and the query string they keep

What it does for a reader: Load more adds the next page of cards under the ones already shown and moves focus to the first new card, and the status line reads "Showing 24 of 40 posts" and then "All 40 posts shown". A page link changes the cards in place and the status reads "Page 2 of 4". If a request fails, the cards already on show stay and a Try again button appears. If the rate limit is hit, a wait message shows how many seconds to wait. The list follows a category's own page size and layout. The search page shows the same highlighted snippets as Blade when search highlighting is on.

The search-box component#

The Search page with the search box filled in, captured from the Blade set

The search page with "tent" typed in: a labelled box, an orange Search button and one result. With Livewire, a short list of suggested post titles also appears under the box as you type; that dropdown has no still capture yet.

The search box is a normal form that sends a GET request to the search page, so it works with no JavaScript. Livewire only adds the suggestion list.

  • It asks for suggestions once the term is two or more characters, after the debounce pause, and shows up to suggestions post titles, each a link to its post. The term is cut to 100 characters.
  • The matched words are marked in each suggested title. For the term lara, the suggestion "Laravel tips" shows Lara marked. The title is escaped text with only the mark added.
  • Suggestions are asked for again on every render, never kept, so a draft or an unpublished post can never appear in one.
  • States: no suggestions reads "No posts match"; a failed lookup shows an error with Try again; being over search_limit shows the wait time.
  • Its inputs are locked: blogId, locale and action (the search page address). term is the text in the box.

Override the Livewire views#

The two component views are published with php artisan vendor:publish --tag=cwb-livewire-views-tailwind or --tag=cwb-livewire-views-bootstrap into resources/views/vendor/coullworks-blog-livewire. A copy there wins over the package view. The seven Livewire interface strings (status line, all shown, page status, suggestions count, no match, suggestion list label, Try again) are in the livewire language file of the coullworks-blog namespace. The other interface strings are described in Choosing a front end.

Screenshots of the Livewire front end#

The captures below are of the Livewire front end itself, in both view sets.

Livewire with Tailwind#

The Livewire Tailwind blog home page at 1440 px: header, category pills, a lead post and cards

The Livewire Tailwind listing on a 1440 px window.

The Livewire Tailwind blog home page at 390 px: one column of cards

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

The Livewire Tailwind article page at 1440 px: breadcrumbs, the GUIDES kicker, the title, the standfirst, the byline with reading time and the hero image

The Livewire Tailwind article page at 1440 px.

The Livewire Tailwind article page at 390 px, with an On this page contents control under the hero image

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

The Livewire Tailwind search page with the term tent filled in and one result card

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

The Livewire Tailwind lightbox open over an article, showing the tarn photograph and its caption

The Livewire Tailwind Figure lightbox open. The same dialog is used in every front end.

Livewire with Bootstrap#

The Livewire Bootstrap blog home page at 1440 px: header, category pills, a lead post and cards

The Livewire Bootstrap listing on a 1440 px window.

The Livewire Bootstrap blog home page at 390 px: one column of cards

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

The Livewire Bootstrap article page at 1440 px: breadcrumbs, the GUIDES kicker, the title, the standfirst, the byline with reading time and the hero image

The Livewire Bootstrap article page at 1440 px.

The Livewire Bootstrap article page at 390 px, with an On this page contents control under the hero image

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

The Livewire Bootstrap search page with the term tent filled in and one result card

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

The Livewire Bootstrap lightbox open over an article, showing the tarn photograph and its caption

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

Available for new work

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