diff --git a/src/Breadcrumbs/Registry.php b/src/Breadcrumbs/Registry.php index 06019ae9..4fd0c4ff 100644 --- a/src/Breadcrumbs/Registry.php +++ b/src/Breadcrumbs/Registry.php @@ -3,10 +3,11 @@ namespace Cone\Root\Breadcrumbs; use Closure; +use Cone\Root\Interfaces\Breadcrumbs\Registry as Contract; use Illuminate\Http\Request; use Illuminate\Routing\Route; -class Registry +class Registry implements Contract { /** * The registered patterns. diff --git a/src/Interfaces/Breadcrumbs/Registry.php b/src/Interfaces/Breadcrumbs/Registry.php new file mode 100644 index 00000000..e06372d4 --- /dev/null +++ b/src/Interfaces/Breadcrumbs/Registry.php @@ -0,0 +1,24 @@ +app = $app; $this->resources = new Resources; $this->widgets = new Widgets; - $this->navigation = new Navigation; - $this->breadcrumbs = new Breadcrumbs; + $this->navigation = $app->make(Navigation::class); + $this->breadcrumbs = $app->make(Breadcrumbs::class); $this->timezone = $app['config']->get('app.timezone'); } diff --git a/src/RootServiceProvider.php b/src/RootServiceProvider.php index 4afdaf6c..3c32b339 100644 --- a/src/RootServiceProvider.php +++ b/src/RootServiceProvider.php @@ -34,11 +34,13 @@ class RootServiceProvider extends ServiceProvider * @var array */ public $bindings = [ + Interfaces\Breadcrumbs\Registry::class => Breadcrumbs\Registry::class, Interfaces\Models\AuthCode::class => Models\AuthCode::class, Interfaces\Models\Medium::class => Models\Medium::class, Interfaces\Models\Meta::class => Models\Meta::class, Interfaces\Models\Notification::class => Models\Notification::class, Interfaces\Models\User::class => Models\User::class, + Interfaces\Navigation\Registry::class => Navigation\Registry::class, ]; /**