コード例 #1
0
 /**
  * Overwrite the parent method to add the requires fields.
  *
  * @param  array    $fields
  * @return Template
  */
 public function create(array $fields)
 {
     return parent::create($fields);
 }
コード例 #2
0
 /**
  * Remove the specified model from storage.
  *
  * @param int $model_id
  *
  * @return array
  */
 public function destroy($model_id)
 {
     $this->repository->deleteById($model_id);
     return ['success' => true];
 }
コード例 #3
0
 /**
  * Overwrite the parent method to add the requires fields.
  *
  * @param  array    $fields
  * @return Template
  */
 public function create(array $fields)
 {
     $fields['group_id'] = Template::GROUP_ID;
     $fields['is_template'] = true;
     return parent::create($fields);
 }