public __construct ( object $attributes, array $options = [] ) | ||
$attributes | object | Attributes of this model |
$options | array | Options with which to configure this model |
public function __construct($attributes, array $options = [])
{
$this->site = $options['collection']->getSite();
parent::__construct($attributes, $options);
$this->url = "sites/{$this->site->id}/environments/{$this->id}";
}