/** * @inheritdoc */ public function execute(Request $request, DataSourceInterface $resource, $identifier) { if (!$resource->delete(intval($identifier))) { throw new NotFoundHttpException(); } return ActionResult::simple(200, ['status' => 'success']); }
/** * @inheritdoc */ public function execute(Request $request, DataSourceInterface $resource) { return ActionResult::simple(200, ['count' => $resource->count()]); }