https://twill.io logo
My controller as per documentation: ``` class Pag...
# ❓questions
j
My controller as per documentation:
Copy code
class PageController extends BaseModuleController
{
    protected $moduleName = 'pages';

    public $permalinkBase = '';

    protected $indexOptions = [
        'reorder' => true,
    ];
    protected $nestedItemsDepth = 4;

    protected function form($id, $item = null):array
    {
        $item = $this->repository->getById($id, $this->formWith, $this->formWithCount);

        $this->permalinkBase = $item->ancestorsSlug;

        return parent::form($id, $item);
    }
}