Laravel
Install tbtop/cms into a Laravel app, wire the host and create the first admin.
tbtop/cms brings the content: tables, admin pages and frontend routes. The admin
panel itself comes from its dependency tbtop/admin,
which has its own installer.
Requirements: PHP 8.4 and Laravel 12 or 13. Composer pulls in tbtop/admin 0.8.1 or later.
Install
Run both installers, in this order:
composer require tbtop/cms
php artisan vendor:publish --tag="tbtop-cms-config"
php artisan admin:install
php artisan cms:install
npm install @tbtop/inertia-admin @json-render/core @json-render/reactWire the host
The installers print these steps but cannot do them: each one edits a file of your app.
-
Add
resources/js/admin.tsxto the Viteinputlist. -
Register the frontend routes last in
routes/web.php, because they end in a catch-all:Cms::frontendRoutes(); -
Create
resources/js/pages/Cms/Page.tsx. Re-export@cms/CmsPageto start; copy it into your app once you need site chrome around the page. -
Add the
@cmsalias tovite.config.tsandtsconfig.json. -
Import
@cms/admin/blocksinadmin.tsx, and add the two@sourcelines toresources/css/admin.css. -
Add
@include('tbtop-cms::head')above the Inertia head in the root view, so the SEO tags render on the server. -
Delete
public/robots.txt: the CMS serves robots from its settings.
Create the first admin
php artisan cms:admin:create you@example.com
php artisan cms:doctorThe first admin becomes the owner. cms:doctor checks the wiring above; run it
again after any change to routes, Vite entries or the root view.
Next
The package's own guide covers blocks, page types, seeding content, SEO, forms
and every config key, command and route:
docs/host/ai.
Guides on this site follow.