From 3ad4b01d99745b66930bacbb927619802ba5463e Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sun, 24 Mar 2024 11:08:20 +0100 Subject: [PATCH] Contract vital shared parts of route interface --- .../src/Support/Contracts/RouteContract.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/framework/src/Support/Contracts/RouteContract.php b/packages/framework/src/Support/Contracts/RouteContract.php index 62168c137e8..a62e0c3480b 100644 --- a/packages/framework/src/Support/Contracts/RouteContract.php +++ b/packages/framework/src/Support/Contracts/RouteContract.php @@ -5,8 +5,18 @@ namespace Hyde\Support\Contracts; use Stringable; +use Hyde\Support\Models\Route; +use Hyde\Support\Models\RouteKey; interface RouteContract extends SerializableContract, Stringable { - // + /** + * Generate a link that resolves to the route destination. + */ + public function getLink(): string; + + /** + * Check if the route is the same as the given route. + */ + public function is(Route|RouteKey|string $route): bool; }