Weave Code
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

Twill Laravel Package

area17/twill

Twill is an open-source Laravel package for building a custom CMS fast. It provides a polished admin UI with prebuilt features and Vue components, stays flexible and extensible, works headless or integrated, and lets you use your own models with no lock-in.

View on GitHub
Deep Wiki
Context7

Adding Browser Fields to a Block

To attach other records inside a block, it is possible to use the browser field.

  • In a block, use the browser field:

:::filename::: views/twill/blocks/products.blade.php :::#filename:::

[@twillBlockTitle](https://github.com/twillBlockTitle)('Products')

<x-twill::browser
    route-prefix="shop"
    module-name="products"
    name="products"
    label="Products"
    :max="10"
/>
  • If the module you are browsing is not at the root of your admin, you should use the browser_route_prefixes array in the configuration in addition to routePrefix in the form field declaration:
'block_editor' => [
    ...
    'browser_route_prefixes' => [
        'products' => 'shop',
    ],
    ...
],
  • When rendering the blocks on the frontend you can get the browser items selected in the block, by using the getRelated helper to retrieve the selected items. Example in a blade template:

:::filename::: views/site/blocks/blockWithBrowser.blade.php :::#filename:::

[@php](https://github.com/php)
  $selected_items = $block->getRelated('browserFieldName');
[@endphp](https://github.com/endphp)
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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport