Creates a new instance of the model.
public __construct ( array $attributes = [] ) | ||
$attributes | array |
public function __construct(array $attributes = []) { parent::__construct($attributes); if (empty($attributes['slug']) && !empty($attributes['name'])) { $attributes['slug'] = \Slugify::slugify($attributes['name']); } }