Exemplo n.º 1
0
 /**
  * @param int $id
  *
  * @return mixed
  * @throws RepositoryException
  */
 public function restore($id)
 {
     if ($this->hasDeleteTrait($this->modelInstance)) {
         $this->modelInstance = $this->modelInstance->withTrashed()->findOrFail($id);
         return $this->modelInstance->restore();
     }
     throw new RepositoryException("{$this->modelInstance->getTable()} has not deleted records");
 }