/**
* Resolve a parameter value for the route.
*
* @param string $key
* @return mixed
*/
protected function resolveParameter($key)
{
$value = $this->parameters[$key];
// If the parameter has a binder, we will call the binder to resolve the real
// value for the parameters. The binders could make a database call to get
// a User object for example or may transform the input in some fashion.
if ($this->router->hasBinder($key)) {
return $this->router->performBinding($key, $value, $this);
}
return $value;
}