public function attributeFormat($attribute, $model, $generator) { $key = $this->findValue($this->getModelKey($attribute, $model), $this->attributeFormats); if ($key) { return $this->attributeFormats[$key]($attribute, $model, $generator); } }