الصفحات · Laravilt
Discovery
Register resources, pages, clusters and widgets automatically or by hand.
A panel only shows the resources, pages, clusters and widgets registered on it. You can let Laravilt discover them or register them yourself.
Automatic Discovery
php
For a panel with id admin, this scans:
app/Laravilt/Admin/Pages(App\Laravilt\Admin\Pages)app/Laravilt/Admin/Resources(App\Laravilt\Admin\Resources)app/Laravilt/Admin/Clusters(App\Laravilt\Admin\Clusters)app/Laravilt/Admin/Widgets(App\Laravilt\Admin\Widgets)
It also scans Modules/{Module}/Laravilt/Admin/... in modular applications.
Discovering Custom Directories
Each discover*() method takes a directory and its namespace:
php
Manual Registration
php
clusters([...]) and widgets([...]) work the same way. Nested resources are not registered directly. They are picked up from their parent resource's getNestedResources().
Directory Structure
This is what the generators create (laravilt:resource, laravilt:page, laravilt:cluster, laravilt:widget):
text
Next Steps
- Resources: CRUD resources
- Pages: custom pages
- Navigation: navigation configuration