Skip to content

Commit e0930fe

Browse files
committed
Added better readme
1 parent a5524ef commit e0930fe

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,20 @@ abstract class Resource extends NovaResource
4646
use Breadcrumbs;
4747
```
4848

49+
And to define the parent that should be shown add the following function to any resource.
50+
51+
```php
52+
/**
53+
* Get the parent to be displayed in the breadcrumbs.
54+
*
55+
* @return \Illuminate\Database\Eloquent\Model|null
56+
*/
57+
public function breadcrumbParent()
58+
{
59+
return $this->model()->parentModel;
60+
}
61+
```
62+
4963
## Customisation
5064

5165
You can disable the bundled styles and load your own by adding the following method to the call:

0 commit comments

Comments
 (0)