/** * @param array $attributes * @return static */ public function create(array $attributes = array()) { $attributes['created_by'] = $this->user->user()->id; if (!isset($attributes['state']) || empty($attributes['state'])) { $attributes['state'] = 0; } return $this->model->create($attributes); }
/** * @param array $attributes * @return static */ public function create(array $attributes = array()) { $attributes['created_by'] = $this->user->user()->id; return $this->model->create($attributes); }