UrlRoutable.php 881 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace Illuminate\Contracts\Routing;
  3. interface UrlRoutable
  4. {
  5. /**
  6. * Get the value of the model's route key.
  7. *
  8. * @return mixed
  9. */
  10. public function getRouteKey();
  11. /**
  12. * Get the route key for the model.
  13. *
  14. * @return string
  15. */
  16. public function getRouteKeyName();
  17. /**
  18. * Retrieve the model for a bound value.
  19. *
  20. * @param mixed $value
  21. * @param string|null $field
  22. * @return \Illuminate\Database\Eloquent\Model|null
  23. */
  24. public function resolveRouteBinding($value, $field = null);
  25. /**
  26. * Retrieve the child model for a bound value.
  27. *
  28. * @param string $childType
  29. * @param mixed $value
  30. * @param string|null $field
  31. * @return \Illuminate\Database\Eloquent\Model|null
  32. */
  33. public function resolveChildRouteBinding($childType, $value, $field);
  34. }