__construct() публичный Метод

Creates a new instance of the model.
public __construct ( array $attributes = [] )
$attributes array
Пример #1
0
 public function __construct(array $attributes = [])
 {
     parent::__construct($attributes);
     if (empty($attributes['slug']) && !empty($attributes['name'])) {
         $attributes['slug'] = \Slugify::slugify($attributes['name']);
     }
 }