diff --git a/README.md b/README.md index 8dca221..98f6b79 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ This package for the [Laravel framework](https://laravel.com/) will make it easy Run this at the command line: ```php -$ composer require tabuna/breadcrumbs +composer require tabuna/breadcrumbs ``` This will update `composer.json` and install the package into the `vendor/` directory. diff --git a/src/Manager.php b/src/Manager.php index 90e1493..fbcdb77 100644 --- a/src/Manager.php +++ b/src/Manager.php @@ -84,7 +84,7 @@ public function generate(string $route, $parameters = null): Collection * * @return bool */ - public function has(string $name = null): bool + public function has(?string $name = null): bool { $name = $name ?? Route::currentRouteName(); diff --git a/src/Trail.php b/src/Trail.php index 226f1be..515edde 100644 --- a/src/Trail.php +++ b/src/Trail.php @@ -148,7 +148,7 @@ public function parent(string $name, ...$parameters): self * * @return Trail */ - public function push(string $title, string $url = null): self + public function push(string $title, ?string $url = null): self { $this->breadcrumbs->push(new Crumb($title, $url));