-
Notifications
You must be signed in to change notification settings - Fork 1
/
Routable.php
38 lines (32 loc) · 972 Bytes
/
Routable.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
namespace Oddvalue\DbRouter\Contracts;
use Oddvalue\LinkBuilder\Contracts\Linkable;
use Illuminate\Database\Eloquent\Relations\MorphOne;
use Illuminate\Database\Eloquent\Relations\MorphMany;
interface Routable extends Linkable
{
/**
* Get the model's route generator
*
* @return \Oddvalue\DbRouter\Contracts\RouteGenerator
*/
public function getRouteGenerator() : RouteGenerator;
/**
* Relation to the canonical route for the model
*
* @return \Illuminate\Database\Eloquent\Relations\MorphOne
*/
public function canonicalRoute() : MorphOne;
/**
* Relation to all the model's routes
*
* @return \Illuminate\Database\Eloquent\Relations\MorphMany
*/
public function routes() : MorphMany;
/**
* Relation to all the model's redirect routes
*
* @return \Illuminate\Database\Eloquent\Relations\MorphMany
*/
public function redirectRoutes() : MorphMany;
}