Enabling the site tree
config/admin.php
php artisan admin:migrate.
Developers define the structure: groups like the main menu or the footer, and which item types each part accepts. Allow editing of the structure with an environment variable, e.g. only locally:
.env
Items
Names and urls are translatable when localization is enabled.
Models in the site tree
Allow records of a model in the tree with$sitetree. The value is the label column:
app/Models/Branch.php
slug. Add more columns with siteTreeColumns(), or use the AdminWebsite\Eloquent\Concerns\HasSiteTree trait, which provides the default methods.
Rendering the navigation
resources/views/partials/menu.blade.php
Each item has: