public function fill(array $attributes)
    {
        foreach ($attributes as $key => $value) {
            if (array_search($key, $this->fillable) !== false) {
                $this->{$key} = $value;
            }
        }
    }
public function fill(array $attributes)
    {
        foreach ($attributes as $key => $value) {
            if (array_search($key, $this->fillable) !== false) {
                $this->{$key} = $value;
            }
        }
    }
public function fill ( array $ attributes ) { foreach ( $ attributes as $ key => $ value ) { if ( array_search ( $ key , $ this -> fillable ) !== false ) { $ this -> { $ key } = $ value ; } } }
Fills the part with attributes.

@param array $attributes Attributes to set.
Fills the part with attributes .