Illuminate\Database\Eloquent\Model::hasGetMutator PHP Method

hasGetMutator() public method

Determine if a get mutator exists for an attribute.
public hasGetMutator ( string $key ) : boolean
$key string
return boolean
    public function hasGetMutator($key)
    {
        return method_exists($this, 'get' . Str::studly($key) . 'Attribute');
    }

Usage Example

Example #1
0
 public function hasGetMutator($key)
 {
     if ($this->autoserialize_attributes) {
         foreach ($this->attributes_schema as $k => $value) {
             if ($value == 'array' && $k == $key || $value == 'object' && $k == $key) {
                 return true;
             }
         }
     }
     return parent::hasGetMutator($key);
 }
All Usage Examples Of Illuminate\Database\Eloquent\Model::hasGetMutator
Model