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.
To attach other records inside a block, it is possible to use the browser field.
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"
/>
browser_route_prefixes array in the configuration in addition to routePrefix in the form field declaration:'block_editor' => [
...
'browser_route_prefixes' => [
'products' => 'shop',
],
...
],
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)
How can I help you explore Laravel packages today?