protected function getForeignModelFromRequest($name)
    {
        $this->checkForeignModelFromRequest($name);
        $requestKey = $this->getRequestKeyFromString($name);

        return $this->getRequest()->attributes->get($requestKey);
    }