*/ public function schema(JsonSchema $schema): array { return [ 'label_id' => $schema->string()->description('Id of the label to delete.')->required(), 'space' => $schema->string()->description('Space id. Defaults to the personal space.'), ]; } protected function write(Request $request, User $user): Response { $space = $this->resolveSpace($request, $user); $label = $this->labelInSpace($request, $space); $label->delete(); return $this->json(['deleted' => true, 'id' => $label->id]); } }