Skip to content

Block

The Block class is used to create blocks within a resource, allowing you to organize fields into logical groups.

Example usage:

php
Block::make('Main Information')
    ->chunk('main_chunk')
    ->description('Basic resource data')
    ->fields([
        Field::make('title')->label('Title'),
        Field::make('content')->type('textarea')->label('Content'),
    ]);

Available methods:

  • chunk(string $chunk) – Sets the chunk to which the block will be linked.
  • description(string $description) – Sets the block description.
  • fields(array $fields) – Defines the list of fields within the block.

© PageBlocks 2019-present