litstack/bricks

Maintainers

Package info

github.com/litstack/bricks

pkg:composer/litstack/bricks

Transparency log

Statistics

Installs: 5

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 2

v0.9.2 2023-07-26 13:57 UTC

This package is auto-updated.

Last update: 2026-07-13 10:06:23 UTC


README

Pre-built Repeatables and Templates for common Webcontents.

Install

composer require litstack/bricks

php artisan lit-bricks:install

Usage

Add the desired Repeatables to your blocks:

use Litstack\Bricks\Repeatables\TextRepeatable;

$page->card(function ($form) {
    $form->block('content')
        ->title('My Content')
        ->repeatables(function ($repeatables) {
            $repeatables->add(TextRepeatable::class);
        });
});

Return a view, pass it the formdata:

return view('welcome')->with([
    'form' => Form::load('pages', 'home')
]);

Add the block to your template:

@block($form->content)

Customize Templates

You can publish the templates to resources/views/vendor/bricks/ and edit them to your needs:

php artisan vendor:publish --provider="Litstack\Bricks\BricksServiceProvider --tag=views"

Components

Repeatables

Name Fields  Usage
TextRepeatable::class WYSIWYG Simple Text-Repeatable
ImageRepeatable::class image Single Image-Repeatable using <x-lit-image /> Component
ImagesRepeatable::class image Multiple Image-Repeatable using <x-lit-image /> Component
ImageSlideRepeatable::class image, input, textarea Image-Repeatable using <x-lit-image /> Component, Input and Textarea