Block classes

If you need more control over blocks, their validation or data for rendering you can use a block class.

To do this, create a file named after your block. (ex. for images_grid.blade.php your class will be ImagesGridBlock)

A block class extends A17\Twill\Services\Blocks\Block and they are expected to be in the App\Twill\Block namespace:

1<?php
2 
3namespace App\Twill\Block;
4 
5use A17\Twill\Services\Blocks\Block;
6 
7class ExampleBlock extends Block
8{
9}

With a block class you can: