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.
When needed you can expose additional data to block forms using a Block class.
:::alert=type.warning:::
The getFormData is only called once per module form and is not context aware.
:::#alert:::
<?php
namespace App\Twill\Block;
use A17\Twill\Services\Blocks\Block;
class TextBlock extends Block
{
public function getFormData(): array
{
return ['bar' => 'foo'];
}
}
Now in your form you can use it as:
[@twillBlockTitle](https://github.com/twillBlockTitle)('Text')
[@twillBlockIcon](https://github.com/twillBlockIcon)('text')
[@twillBlockGroup](https://github.com/twillBlockGroup)('app')
[@if](https://github.com/if) ($bar === 'foo')
... Conditional form fields
[@endif](https://github.com/endif)
How can I help you explore Laravel packages today?