Docs / Inlay / Installation

Installation

composer require wearepixel/inlay "livewire/livewire:^4.0"
php artisan inlay:install

inlay:install looks at your app - Tailwind, Bootstrap or plain CSS, whether it has a login, which layouts it already has - and wires Inlay in:

  • publishes the config and runs the migrations (on a production database it asks first, and skips them when not interactive)
  • writes app/Providers/InlayServiceProvider.php, which registers your sections and blocks, sets the preview view and defines the inlay.manage-pages gate (allowed only when the app is running locally until you change it)
  • writes the view published pages render through, inside one of your layouts or as a standalone page loading your Vite assets
  • adds Inlay::adminRoutes(), Inlay::previewLinkRoutes() and, last of all, Inlay::pageRoutes() to routes/web.php - in a brand new app, replacing the welcome route
  • sets admin.ability to inlay.manage-pages, and adds auth to the admin middleware when your app has a login
  • optionally copies a starter kit and builds a homepage from it

Every step is skipped when it's already done, so it's safe to run again. Each step reports DONE or NEEDS YOU with what to do by hand - for example when config/inlay.php has already been customised.

Then:

npm run build
php artisan inlay:doctor

and visit /inlay/pages.

Options

Option Purpose
--starter= landing, showcase or none. Asked interactively when omitted.
--css= Starter styling: tailwind, bootstrap or plain. Detected from package.json by default.
--layout= Render pages inside an existing layout, e.g. component:layouts.site or extends:layouts.app. Asked interactively when omitted, with a standalone page as the default.
--demo Create and publish a homepage from the starter kit.
--force Overwrite starter files that already exist.

Adding Inlay to an existing project

Run the same command. It leaves your existing routes and welcome page alone, and asks which of your layouts published pages should render inside. To turn pages you already have into editable ones, see Importing Blade pages.

The generated provider is ordinary code you own. Its shape:

public function boot(): void
{
    Gate::define('inlay.manage-pages', fn ($user = null) => $this->app->isLocal());

    Inlay::singleFileBlocks(resource_path('views/inlay/blocks'));
    Inlay::singleFileSections(resource_path('views/inlay/sections'));

    Inlay::previewView('inlay.pages.show');
}

Replace the gate with your own rule before going live, e.g. fn (User $user) => $user->is_admin.

CSS framework

Tell Inlay which CSS approach the site uses. It picks the starter kit variant and tells AI agents what to build with:

INLAY_CSS_FRAMEWORK=tailwind   # tailwind, bootstrap or plain

Checking the setup

php artisan inlay:doctor checks the setup and prints how to fix anything missing:

Check Fails as
Config published warning
Database tables (pages, page_sections, page_revisions, inlay_site_settings) failure
Livewire installed (for the admin) failure
Admin routes registered failure
Admin access restricted - admin.ability is set, defined, and refuses guests failure
Sections registered failure
Preview uses your frontend (Inlay::previewView()) warning
Public page routes registered warning
Pages are reachable at their URLs, and Inlay::pageRoutes() is registered last failure
Published homepage warning
Uploaded images are public (storage:link) warning
Preview links can be shared (cache store isn't array) warning

It exits with a failure code when any check fails.

Configuration

Publish the config to customise it:

php artisan vendor:publish --tag=inlay-config
Key Default Purpose
sections [] Class-based sections, by handle.
blocks [] Class-based blocks, by handle.
disk public Where image uploads are stored.
admin.prefix inlay Admin URL prefix.
admin.middleware ['web'] Admin middleware. The default leaves the admin public.
admin.ability null Gate ability every admin screen checks.
admin.layout null Blade component to render the admin inside.
pages.prefix null Public page prefix; null is the site root.
pages.middleware ['web'] Public page middleware.
pages.view inlay.pages.show The view a public page renders through.
preview_links.* inlay-preview, ['web'], 30 min Signed preview link route and lifetime.
mcp.*, styling.*, agent_sections.* See MCP server.

The admin options are covered in Customising the admin, and the page options in Routing.

Discovery Call

One call.
We'll both know.

20 minutes to walk through your project, ask the hard questions, and work out honestly if we're the right team for it.

  • One call per day - it gets our full attention
  • Australia's only Laravel Premier Partner
  • Trusted by Chemist Warehouse, HelloFresh and Youfoodz
  • Senior engineers only - no juniors on your project
  • Brisbane-based, onshore team

Press Esc to close  ·  B to reopen