Closed kerrinhardy closed 2 years ago
I don’t think I’ve personally ever used includes (I would instead break things out into multiple classes with a single static method like PostBreadcrumbs::register()
that can be called from the root breadcrumbs file using namespaced imports) but I don’t know of any reason why an include wouldn’t work. Is there a specific error you’re getting when you try this?
Thanks for the update. I started going down that path, and then looking at the config file I see there is an option to use a wildcard:
'files' => glob(base_path('breadcrumbs/*.php')),
Turns out it was easy to do. Thank you for a great plugin!
In my application there are a number of pages for each model (the standard CRUD pages, plus additional views and reports). Before it becomes too unwieldily, I was looking to split it up into multiple files - all called from breadcrumbs.php.
A simple require / include statement is not working (in a Laravel project)?
Has anyone done this before?