renox-admin
An admin panel for Renox apps, generated from their
models (Laravel's Filament resources). Declare each model once, as a resource: its list's
columns, its form's fields and its policy. The panel gives it the rest, on the UI kit and
renox::grid.
use *;
use Admin;
new
.module
.module
What each resource gets:
- a list (
/admin/products): a data grid with search, a filter in each heading, named filters as tabs, sorting, pages, the user's own columns, and CSV, print and Excel (thexlsxfeature) exports; - create and edit pages built from its fields (text, email, password, number, money, date,
date-time, select, checkbox, toggle, belongs-to), checked by the form type's own
Validaterules, with errors under their fields (htmx) and a toast after saving; - a view page (the kit's infolist), and delete with a confirmation; with soft deletes, a trash to restore from or delete for good;
- bulk actions (delete, and the resource's own
AdminActions, which can ask for input in a sheet) and row actions; - an after-save hook that gets the user, child rows managed as tabs of a record (relation
managers: has-many and pivot), edit-only resources, slots in the layout for the app's content,
and every word of the panel translatable (
renox.admin.*); - the model's
Policyasked before every page and button (viewAny,view,create,update,delete,deleteAny,restore,forceDelete, …); - a sidebar with every resource the user may see, and a dashboard with their counts.
The pages are templates (renox-admin/*.html) an app replaces with files of the same name.
The guide is docs/admin.md;
examples/bikeshop puts its catalogue, workshop, suppliers and stores in a panel made with it. Versioned with renox: use the same
version for both.