The whole path
TreePathEntry::make('department_id')->tree(Department::class) shows the department of an order with all its parents.
Note: What you see
The department of the order is shown from the top level down.
Only the last levels
->pathDepth(2) keeps the last two levels, for narrow columns.
Note: What you see
Only the office and the team are shown, without Sales and the region.
Another separator
->pathSeparator(' / ') writes the path with slashes.
Note: What you see
The same path, written with / between the departments.
In a table
The orders list uses TreePathColumn for the department, and TreeFilter to filter the orders by a department.
Note: Try it
Open the orders: the Department column shows the path of each order.