Skip to content

Page

A page corresponds to a page in the app where you define the main content. A resource page contains one main get route and may contains other routes (post, put, delete).

Defining content

The main content of the page is defined in the outline method.

CreateCategory.php
public function outline(): array
{
return [
Form::make('category')
->fields([])
];
}

You can use all the available components that xumina provides to set your page content anyway you like. You have full control over the structure of your content. Check content for more info.

Every page use the layout defined in panel. Check Layout page for customizing layout.

Authorization

Resource page use laravel native policy class for resource authorization. For custom page or to override a resource page authorization logic, add a authorize method to your page. It should return a boolean value.

public function authorize(): bool
{
return auth()->user()->can('access-custom-page');
}