amarenkov / laravel-mutable-content-daisyui
Server-rendered Blade, Livewire and daisyUI screens for laravel-mutable-content: forms, tables and management of fields and lists of values.
Package info
github.com/amarenkov/laravel-mutable-content-daisyui
pkg:composer/amarenkov/laravel-mutable-content-daisyui
Requires
- php: ^8.4
- amarenkov/laravel-mutable-content: ^0.6
- livewire/livewire: ^4.0
- mallardduck/blade-lucide-icons: ^2.0
Requires (Dev)
- larastan/larastan: ^3.0
- orchestra/testbench: ^11.0
- phpunit/phpunit: ^12.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-10 14:33:21 UTC
README
Blade components on daisyUI for
amarenkov/laravel-mutable-content.
Server-rendered screens for models with mutable fields: forms, detail views and tables built from field definitions, with a minimal amount of JavaScript.
Screenshots
A demo bicycle catalog. The pages extend ManageRecords and only set the model.
Table built from the field definitions: search, sorting, column toggles, LOV items with Lucide icons, object titles and values in display units.
Create and edit modal with inputs chosen by field type.
Fields with quick filters by class and LOV; the lock marks fields declared in code.
Lists of values: items with icons, added one by one or as a list of labels.
Stack
- Laravel 13 and Blade components
- Tailwind CSS 4 and daisyUI 5
- Livewire for server-driven interactivity, Alpine.js for small client-side behaviour
Design principles
- daisyUI is the only UI dependency. It is a pure CSS plugin for Tailwind CSS: no runtime JavaScript and no transitive dependencies. No other UI kits or JavaScript widget libraries.
- daisyUI markup lives in the package's own Blade components (button, field, table, modal and so on). Screens use these components, not daisyUI classes directly, so a daisyUI major upgrade or a switch to another CSS kit touches one place.
- Native HTML first. Modals use
<dialog>, dropdowns usepopoveror<details>, dates use<input type="date">, suggestions use<datalist>. Where native elements are not enough, a small Alpine.js component (Alpine ships with Livewire) instead of a third-party widget. - The host app pins daisyUI to one major version (
"daisyui": "^5"). Majors may rename classes, so they are upgraded deliberately, together with this package.
Requirements
- PHP 8.4
amarenkov/laravel-mutable-content- Livewire 4, Lucide icons through
mallardduck/blade-lucide-icons
Installation
composer require amarenkov/laravel-mutable-content-daisyui npm i -D daisyui@5
The package views are styled by the application build. Add daisyUI and the package sources to
resources/css/app.css:
@import 'tailwindcss'; @plugin 'daisyui'; @source '../../vendor/amarenkov/laravel-mutable-content-daisyui/resources/views'; @source '../../vendor/amarenkov/laravel-mutable-content-daisyui/src';
Management screens
Screens for fields, their usage in classes, lists of values (LOVs) and their items: an administrator adds new fields without a developer and without migrations. The application registers them inside its own route group, with its middleware and prefix but without a name prefix:
use Amarenkov\MutableContentDaisyUi\MutableContentDaisyUi; Route::middleware('auth')->prefix('settings')->group(function () { MutableContentDaisyUi::routes(); });
Route names are the MutableContentDaisyUi::ROUTE_* constants: ROUTE_FIELDS,
ROUTE_FIELD_USAGE, ROUTE_LOVS and ROUTE_LOV_ITEMS.
The screens are full-page Livewire components rendered in the layouts::app layout, which gets
the page title as $title. Another layout is set in the config
(php artisan vendor:publish --tag=mutable-content-daisyui-config) or with
MUTABLE_CONTENT_DAISYUI_LAYOUT.
Every change made on the screens lands in the change log with the user and the page path. System records cannot be deleted, a LOV used in fields cannot be deleted or have its code changed, and items can be added as a list of labels. Fields are filtered by type, LOV and object class and by quick filters (unbound, per class, per LOV); field type settings (display unit, link by code, unlisted codes, allow 0) are edited on the field and overridden on its usage.
Building screens
Extend Livewire\ManageRecords and set the model: the table (search, sorting, filters,
pagination, column toggles), the create and edit modal and deletion are built from the field
definitions.
use Amarenkov\MutableContentDaisyUi\Livewire\ManageRecords; class ManageProjects extends ManageRecords { protected static string $model = Project::class; protected function inputs(): array { $inputs = parent::inputs(); $inputs['status']->live(); return $inputs; } }
columns(), tableFilters() and inputs() return arrays keyed by field code, so a single
column, filter or input is adjusted without rebuilding the list. A model refusing a save or
a deletion with a DomainException, or a unique constraint violation, is shown to the user as
a notification and the form stays open.
Icons
The package uses Lucide. An icon field stores a Lucide icon name, such as
flame; values of other icon sets are not shown. Field type icons are defined in the package:
an icon set for a field type item in the admin panel takes precedence when it is a Lucide name.
Default icons for the items of other LOVs are added with
IconHelper::addLovItemIcons($lovCode, [$itemCode => 'icon-name']).
Components
Screens are built from the package Blade components, e.g. <x-mutable-content-daisyui::button>,
::modal, ::field, ::input, ::select, ::textarea, ::toggle, ::checkbox,
::combobox, ::dropdown, ::collapse, ::badge, ::card, ::table, ::breadcrumbs, ::notifications.
::combobox replaces selects in forms and filters: a list with search (in the browser for short
lists, on the server for long ones such as objects and icons), option icons, keyboard navigation
and ARIA combobox roles. The list is a native popover, so it is not clipped by modals. Notifications are sent
with the mutable-content-notify browser event (type, title, body).
Translations
UI strings are in lang/{en,ru}/ui.php under the mutable-content-daisyui namespace. Publish
them to override:
php artisan vendor:publish --tag=mutable-content-daisyui-lang
License
MIT. See LICENSE.



