Exemplo n.º 1
0
 /**
  * Handles DELETE action
  *
  * @return array
  * @throws NotImplementedException
  */
 protected function handleDELETE()
 {
     if (empty($this->resource)) {
         \Cache::flush();
     } else {
         $service = ServiceHandler::getService($this->resource);
         if ($service instanceof CachedInterface) {
             $service->flush();
         } else {
             throw new NotImplementedException('Service does not implement API controlled cache.');
         }
     }
     return ['success' => true];
 }