InstallPremium
Install CoullWorks Blog for Laravel
Add the package with Composer, publish its configuration, run the migrations, create the default blog and register the Filament plugin.
Updated 17 November 2026Back to the package pageBuy
Composer access tokens#
The package comes from the CoullWorks private Composer repository. You sign in to it with an access token, not with your licence key. Open your account, find Composer access, enter a name (for example the machine or CI job) and press Create access token. The secret is shown once, so copy it before you leave the page. One token covers every package you own. Create one per machine or CI job and revoke any of them at any time.
Run the two commands the account page shows, filled in with your token:
composer config repositories.coullworks composer https://licensing.coullworks.com/composer
composer config --global --auth http-basic.licensing.coullworks.com <public_id> <secret>--global keeps the credentials in your user-level Composer config, out of the project. To store them in the project instead, leave --global out; Composer then writes an auth.json next to composer.json, and that file must be in .gitignore.
Your licence key is a separate thing. It is not a Composer credential. It only activates the package on your domain (see below).
Steps#
Install the package and Filament:
composer require coullworks/laravel-blog filament/filamentPublish the configuration, migrate and create the default blog. Then activate the package on your domain with your licence key: set coullworks-blog.licence.key (the environment variable COULLWORKS_BLOG_LICENCE_KEY) or paste it into the admin Licence screen. See Licence.
php artisan vendor:publish --tag=cwb-config
php artisan migrate --force
php artisan cwb:installThe public blog is styled out of the box. The package ships a compiled stylesheet for each view set (Tailwind and Bootstrap) and the default layout links it, so no CSS build is needed. php artisan cwb:blade-install also publishes the stylesheet to public/vendor/coullworks-blog so your web server serves it directly. Run it again after you update the package.
Register the Filament plugin#
A host with no panel yet creates one with php artisan filament:install --panels. Register the plugin in your panel provider, after the panel's id(). The plugin reads the id when it registers, and a plugin placed before id() stops the application with "A panel has been registered without an id()".
use CoullWorks\Blog\Filament\BlogPlugin;
use Filament\Panel;
function panel(Panel $panel): Panel
{
return $panel->id('admin')->path('admin')->login()->plugin(BlogPlugin::make());
}The public blog answers at the default blog's path and the admin at the panel you register.
Panels#
The package is a Filament plugin. It never creates a panel: you register BlogPlugin::make() on a panel your application already has, after that panel's id().
- Custom id and path. Any id and path work (
->id('staff')->path('team/staff')). Every blog screen, widget and link is built under that panel's own path. Nothing is fixed to/admin. - A domain instead of a path. A panel on its own domain (
->domain('cms.example.com')->path('')) works the same way. - The plugin on a panel that is not the default. Works. The default panel can belong to the host and carry no blog screens. Screens built while you are on the plugin's panel link to that panel. A queued job, command or API request has no current panel, so code that builds a panel URL there (for example
PostResource::getUrl()) uses the default panel and fails when the default panel has no plugin. Pass the panel:PostResource::getUrl('index', panel: 'staff'). The slug-change notice is shown only when the panel in use carries the plugin, so a slug change made through the API never breaks. - Two or more panels, each with the plugin. Works. Each panel gets its own set of routes (
filament.admin.resources.posts.index,filament.staff.resources.posts.index, and so on), no route name collides, and each panel shows the same four sidebar groups with their badges, the dashboard widgets, the settings tabs and the extensions of every module you have switched on (comments, analytics, import, AI). Every link inside a screen, a redirect, a notification or a breadcrumb stays on the panel you are on. The panels are two doors to the same data: they share one set of blogs, posts, settings and licence. They are not two separate blogs. The blog you pick in the switcher is remembered in the session, so it follows the user from one panel to the other on the same domain (a panel on another domain has its own session). To keep two sets of content apart, create two blogs. - Tenancy. A panel that uses Filament tenancy works. The blog's resources do not use the host's tenant (the blog tables have no tenant column), so the tenant appears in the URL and nothing is filtered by it. Use blogs, not tenants, to separate content.
- A different auth guard. Works: set
->authGuard('staff')on the panel. A user signed in on another guard is not let in. - A panel without
->login(). Works when the host handles sign-in. Add Filament'sAuthenticatemiddleware as every panel does (->authMiddleware([Authenticate::class])) and define a route namedlogin; a signed-out visitor is sent there. Without aloginroute Laravel answers with its own "Unauthenticated" error, as it does for any panel. The plugin adds no authentication of its own. - Abilities. The abilities are Laravel gates, so they are the same on every panel: a user who holds
blog.posts.viewcan open posts on any panel that carries the plugin, and a user who holds nothing gets a 403 on all of them. To grant an ability on one panel only, check the panel in your gate, for exampleFilament::getCurrentPanel()?->getId() === 'admin'. - Unsaved-changes warning.
BlogPlugin::make()->withoutUnsavedChangesAlerts()turns it off for the panel it is registered on, and leaves the others as they are.
Grant the abilities#
Every ability is denied until your application grants it, in your own role scheme. The names follow blog.<area>.<verb>:
| Ability | Lets a user |
|---|---|
blog.dashboard.view | see the dashboard |
blog.posts.view, .create, .update, .delete | work with posts |
blog.posts.publish | publish, schedule, archive and feature posts |
blog.revisions.restore | restore a revision |
blog.categories.manage, blog.tags.manage, blog.authors.manage | manage taxonomy and authors |
blog.redirects.manage | manage redirects |
blog.settings.manage | change blog settings |
blog.licence.manage | use the Licence screen |
blog.blogs.manage | manage blogs |
Local development#
A bare IP address is never a local host, so a browser at http://127.0.0.1 sees the blog locked until a licence key is entered. Develop on localhost or a .test name, or list the address in coullworks-blog.licence.local_hosts (ignored in production). The licence page lists every exempt host.
Scheduler and queue#
Make sure php artisan schedule:run runs every minute, and run a queue worker for imports and AI runs.
Optional modules#
The comments, analytics, import and AI modules are off until you switch them on in config/coullworks-blog.php:
return [
'comments' => ['enabled' => true],
'analytics' => ['enabled' => true],
'import' => ['enabled' => true],
'ai' => ['enabled' => true],
];Next, configure the package.







