chris-ware / nova-breadcrumbs

Breadcrumbs for Laravel Nova
152 stars 44 forks source link

Custom parent breadcrumbs #70

Closed sash closed 4 years ago

sash commented 4 years ago

@ampeco we had to create dependant resources that are always parented by another resource, thus creating a larger breadcrumb tree and even showing the full listing of the dependent resource.

This is why I created this fork and implemented the functionality

In order to use it do

class PaymentMethod extends Resource{
   //...
    protected function breadcrumbParents()
    {
        return [
            '/resources/users'                   => 'Users',
            '/resources/users/' . $this->user_id => $this->user->names,
        ];
    }

}