From e0930fe7f53dba41e0a6df19a2ff67ef571d6cea Mon Sep 17 00:00:00 2001 From: Jesper Kold-Hansen Date: Sun, 2 Jan 2022 12:15:52 +0100 Subject: [PATCH] Added better readme --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 6cb6370..ef69c90 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,20 @@ abstract class Resource extends NovaResource use Breadcrumbs; ``` +And to define the parent that should be shown add the following function to any resource. + +```php +/** + * Get the parent to be displayed in the breadcrumbs. + * + * @return \Illuminate\Database\Eloquent\Model|null + */ +public function breadcrumbParent() +{ + return $this->model()->parentModel; +} +``` + ## Customisation You can disable the bundled styles and load your own by adding the following method to the call: