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

__set() public method

Dynamically set attributes on the model.
public __set ( string $key, mixed $value ) : void
$key string
$value mixed
return void
    public function __set($key, $value)
    {
        $this->setAttribute($key, $value);
    }

Usage Example

Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function __set($key, $value)
 {
     if (array_key_exists($key, $this->aliases)) {
         $key = $this->aliases[$key];
     }
     parent::__set($key, $value);
 }
All Usage Examples Of Illuminate\Database\Eloquent\Model::__set
Model