Closed
Description
When overriding the default 404 template with a template that uses breadcrumbs in the view, and navigating to a implictly bound route that 404's you encounter the following error:
Diglactic\Breadcrumbs\ServiceProvider::{closure}(): Argument #2 ($directory) must be of type App\Models\Directory, string given
Here's the relevant breadcrumbs
Breadcrumbs::for('directory.show', function (BreadcrumbTrail $trail, Directory $directory) {
$trail->parent('directory.index');
$trail->push($directory->title, route('directory.show', ['directory' => $directory]));
});
// 404
Breadcrumbs::for('errors.404', function (BreadcrumbTrail $trail) {
$trail->push('Page Not Found');
});
Would you happen to know the best way to resolve this? Going to look into it myself too. :)