Skip to content

Commit

Permalink
Contract vital shared parts of route interface
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Mar 24, 2024
1 parent 7100fa6 commit 3ad4b01
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/framework/src/Support/Contracts/RouteContract.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 3ad4b01

Please sign in to comment.