Skip to content

Commit

Permalink
Implement the is method in child class
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Mar 24, 2024
1 parent 0c33bb2 commit 510649a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/framework/src/Support/Models/ExternalRoute.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ public function getLink(): string
return $this->destination;
}

public function is(Route|RouteKey|string $route): bool
{
return $route instanceof ExternalRoute && $route->destination === $this->destination;
}

/** @return array{destination: string} */
public function toArray(): array
{
Expand Down

0 comments on commit 510649a

Please sign in to comment.