Download the PHP package carljanzell/filament-page-builder without Composer

On this page you can find all versions of the php package carljanzell/filament-page-builder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-page-builder

Filament Page Builder

A drag-and-drop visual page builder for Filament, storing page content as an ordered array of typed blocks in a single JSON column.

[![Latest Version on Packagist](https://img.shields.io/packagist/v/carljanzell/filament-page-builder.svg?style=flat-square)](https://packagist.org/packages/carljanzell/filament-page-builder) [![Total Downloads](https://img.shields.io/packagist/dt/carljanzell/filament-page-builder.svg?style=flat-square)](https://packagist.org/packages/carljanzell/filament-page-builder) [![License](https://img.shields.io/packagist/l/carljanzell/filament-page-builder.svg?style=flat-square)](https://github.com/Darkify19/filament-page-builder/blob/main/LICENSE) **📖 [Documentation](https://darkify19.github.io/filament-page-builder/)**

Which version? Filament 4.12.6+ and 5.x use v0.4.x, from main; this README covers them. Filament 3.3.53+ uses v0.3.x, from the filament-3 branch, whose docs are in the Filament 3 README. composer require carljanzell/filament-page-builder picks the right one for your panel.

Status: the canvas is a nested layout editor. Palette with layout primitives (including Embed), drag into columns, a document outline, token style inspector, inline plaintext editing, undo/redo, ghost recovery and an optimistic save lock — all persisting to the same JSON the form editor uses. On a phone, Design mode is a one-panel editor (Blocks / Page / Settings). Still to come: rich text in place, an image picker, draft/publish and reusable sections. See ROADMAP.md and the improvement pack.

Why

Filament's Builder field is an excellent structured editor, but it is a form: a vertical stack of collapsible panels. You cannot drop a block where you want it on the page, or see the layout you are actually building. This package adds a canvas alongside it — both editing surfaces read and write the same JSON, so neither owns the content.

Design principles

Installation

Requires PHP 8.3+ and Filament 4.12.6+ or 5.x. On Filament 3.3.53+, the same command installs the 0.3.x line, built from the filament-3 branch.

The service provider is auto-discovered. Publish the canvas assets. If your composer.json already runs php artisan filament:upgrade after autoload, this happens on every install:

Register the plugin on a panel:

Apply the trait to the model that stores blocks:

The canvas

Extend the packaged page and bind it to your resource:

Register it as a resource page and the canvas is available at /admin/pages/{record}/design as a full-screen editor — Filament's sidebar and page heading stay behind so the page itself is the workspace:

Blocks are mutated in memory and written on an explicit save, so a drag never waits on a database round trip. Drop a Section to get columns; drag text, images and your own blocks into a column. Click a block and open the Style tab for padding, width, background and alignment — tokens, not raw CSS.

Making the canvas match your site

The package styles the builder chrome but knows nothing about how you style your blocks. Point it at a view that supplies your design tokens and block stylesheet:

Scope that view's rules to .fpb-canvas. A bare body or h2 rule leaks out of the canvas and restyles the builder around it.

Theming the chrome

The builder follows the panel's light and dark mode on its own. Four variables override what it picks, set on :root for light and on html.dark .fpb for dark:

Variable Default What it paints
--fpb-editor-bg #f4f4f5 Behind the whole editor
--fpb-panel-bg #fff The toolbar, palette and inspector
--fpb-raised-bg #fff The selected tab and preview-width pill
--fpb-canvas-bg / --fpb-canvas-fg #fff / #111827 The page preview itself

The canvas keeps its light default in dark mode, because it is a preview of a public page rather than part of the admin chrome. Change the last pair if your site is dark.

Editing on the page

A block can open its own text fields for editing directly on the canvas. Declare which fields, then mark the matching element in your own markup:

@editable expands to editing attributes while the canvas is rendering and to nothing anywhere else, so the public page ships the same markup without them — one component, two contexts.

The declaration is the authority, not the markup: @editable on a field the block never listed emits nothing, and the canvas independently refuses to write an undeclared field, a value of the wrong kind, a richText field (until TipTap is mounted in place), or a block the current user may not author.

Defining a block

fileFields() is explicit rather than inferred: an upload is an array in form state but a plain path once stored, and a map of strings is indistinguishable from a repeater item.

Rendering publicly

A naive @foreach of the stored array will also print the children of a section as top-level blocks. Use the shipped renderer, which walks the tree:

Each column renders as a .fpb-slot inside its .fpb-section. That wrapper is what keeps a column's blocks in that column — a section is a grid, and without it every block becomes its own grid cell. Ship the package stylesheet on the public site, or give .fpb-section and .fpb-slot the equivalent rules in your own theme.

A public page is not inside a panel, so the renderer uses the blocks your default panel registered. If the plugin is on a different panel, name it, or every block is unknown and the page renders empty:

Translations

The editor follows the application's locale. It ships in English, Azerbaijani, French, German, Russian, Spanish and Turkish. A string a locale has not translated yet shows in English.

To change a sentence, publish the files and edit your copy:

They land in lang/vendor/page-builder. Laravel merges your copy over the package's own, key by key, so keep only the strings you change.

Your blocks' labels are your application's strings. label() and description() run on every request, so they can return __('…'). Shortcodes are registered while the panel is built, before the request's locale is set, so give a translated description as a closure:

A new locale is welcome as a pull request: copy resources/lang/en to resources/lang/{locale} and translate it. Keep the :placeholders. The suite checks that a locale has no key English lacks, and that it keeps every placeholder.

Tests

The suite boots a real Filament panel under Testbench, with its own resource, canvas page and block fixtures.

Contributing

Issues and pull requests are welcome on GitHub. Work lands on dev, so open pull requests against dev, and run vendor/bin/pest and composer lint before you push.

Report security problems privately, as SECURITY.md describes, rather than in a public issue.

Licence

The MIT licence. See LICENSE.


All versions of filament-page-builder with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
filament/filament Version ^4.12.6|^5.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package carljanzell/filament-page-builder contains the following files

Loading the files please wait ...