Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Layup Laravel Package

crumbls/layup

Layup is a Laravel package for building dynamic, reusable page layouts. It provides a clean API for defining sections and rendering them in Blade, helping you keep page structure organized, flexible, and easy to maintain. Ideal for CMS-driven sites and admin panels, with minimal boilerplate.

View on GitHub
Deep Wiki
Context7

Getting Started

crumbls/layup adds templated page management to Filament panels. The minimum path to a working page builder:

  1. composer require crumbls/layup
  2. Publish and run migrations: php artisan vendor:publish --tag="layup-migrations" then php artisan migrate
  3. Optionally publish config: php artisan vendor:publish --tag="layup-config"
  4. Register the plugin in your Filament panel provider (->plugin(LayupPlugin::make()))
  5. Open the Layup resource in your panel and create a page from a built-in or saved custom template.

Where to look first: the package's Filament resource (the Pages list/create actions) and the config file's template registration. The first useful use case is creating a page from a template and confirming the template body is populated immediately on creation — this is exactly the behavior fixed in v1.7.0 (#78 / #79).

Requires Filament 5 / Livewire 4.

Implementation Patterns

Create-from-template via the Filament action. The standard workflow is clicking "New Page" in the Layup resource, choosing a built-in or saved custom template, and saving. In v1.7.0 the template is resolved at the moment the page is created, so the new page immediately holds the template's content.

Programmatic creation. When creating pages from your own code/actions, pass the template selection into the create call and let Layup resolve content at create time rather than writing a blank page and patching it afterward. The regression fix confirms resolution happens during creation.

Custom vs. built-in templates. Built-in templates ship with the package; saved custom templates are persisted records. Both are selectable in the same picker, and both now correctly seed content on creation.

Changing templates mid-form. If the user switches templates before saving, the final selection wins. If the user clears the selection entirely, they get a deliberately blank page — a useful "start from scratch" path you can lean on instead of building a separate blank-page action.

Testing integration. Mirror the package's own approach: drive the real Filament/Livewire page-creation action in your feature tests (Livewire component tests against the create-page action), asserting the saved page body matches the selected template. This catches regressions when you override resources or actions.

Gotchas and Tips

  • Pages created empty before v1.7.0 are not repaired. The release explicitly does not backfill previously created blank pages. Recreate them from the template after upgrading, or write a one-off seeder/command that copies template content into the affected records.
  • No migrations, asset rebuilds, or config changes are needed for this upgrade — just composer update crumbls/layup --with-dependencies. Dependency constraints are unchanged.
  • Dependency advisories. The dev lockfile audit flags advisories including a high-severity CommonMark issue. Pin supported, patched versions of your Markdown/CommonMark dependency; don't ship off the dev lockfile.
  • Selection semantics matter in custom actions. If you build your own create flow, resolve the template at creation time and honor "final selection wins" / "cleared = blank" — otherwise you can reintroduce #78 in your own code.
  • Debugging empty pages. If a new page is empty, first check whether a template was actually selected on the form state at create time; the fix keys off the resolved selection, not a post-save lookup.
  • Test the real action, not just the model. The regression was only caught through the actual Filament 5 / Livewire 4 creation action, so stub-level tests around your Page model won't surface this class of bug.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package