blob: 48c3d723dcc90b99098f56b981284b391f159561 [file] [log] [blame]
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +02001<?php
2
3namespace Illuminate\Contracts\Routing;
4
5interface UrlRoutable
6{
7 /**
8 * Get the value of the model's route key.
9 *
10 * @return mixed
11 */
12 public function getRouteKey();
13
14 /**
15 * Get the route key for the model.
16 *
17 * @return string
18 */
19 public function getRouteKeyName();
20
21 /**
22 * Retrieve the model for a bound value.
23 *
24 * @param mixed $value
25 * @param string|null $field
26 * @return \Illuminate\Database\Eloquent\Model|null
27 */
28 public function resolveRouteBinding($value, $field = null);
29
30 /**
31 * Retrieve the child model for a bound value.
32 *
33 * @param string $childType
34 * @param mixed $value
35 * @param string|null $field
36 * @return \Illuminate\Database\Eloquent\Model|null
37 */
38 public function resolveChildRouteBinding($childType, $value, $field);
39}