Adding custom blocks to modules
How do you add custom blocks to modules? Generally i add blocks to a module using $form->add(BlockEditor::make()) within the controller getForm Method. However if i have created a custom block class named EditorBlade and i try to add it like $form->add(EditorBlade::make()) it gives me an error of call to undefined method Editor::make().
I
ifox•371d ago
hi @.zeenux the
BlockEditor
field has a blocks()
method to specify which blocks are available in that field. If you don't use it all your blocks should be. You can use multiple block editor fields too, by using the name()
method.Z
.zeenux•371d ago
Thanks. However how do you add a BlockComponent Class? for instance class Editor extends TwillBlockComponent. How would i add it to the Module?
1.4KMembers
View on DiscordWant results from more Discord servers?
More Posts$renderData returns null when trying to render nestedblocks@php
/** @var \A17\Twill\Services\Blocks\RenderData $renderData */
dd($renderData)
Fetch all models with field value of XSorry to ask such a basic question but I want to do the following....
I have a model called Work (anDisplaying Block elements on the Front Pagehow do you display block elements on the frontpage? And i don't mean the preview file. I want to accdashboard routeHello. I have a problem with dashboard config
I have a Category and CategoryArticle Models
I have aTwill Role based accessHow would i go about adding a Role based access to CMS Components and its entries. For e.g in an imaTwill assets errorHello to everyone i have an website in production builded in twill but some twill assets in there a