Creating a resource with a View page
To create a new resource with a View page, you can use the--view flag:
Adding a View page to an existing resource
If you want to add a View page to an existing resource, create a new page in your resource’sPages directory:
getPages() method:
Viewing records in modals
If your resource is simple, you may wish to view records in modals rather than on the View page. If this is the case, you can just delete the view page. If your resource doesn’t contain aViewAction, you can add one to the $table->actions() array:
Customizing data before filling the form
You may wish to modify the data from a record before it is filled into the form. To do this, you may define amutateFormDataBeforeFill() method on the View page class to modify the $data array, and return the modified version before it is filled into the form:
Authorization
For authorization, Filament will observe any model policies that are registered in your app. Users may access the View page if theview() method of the model policy returns true.
Custom view
For further customization opportunities, you can override the static$view property on the page class to a custom view in your app: