Skip to main content

DELETE Endpoint

src/ApiResource/Admin/BookDto.php
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Patch;
use App\ApiInput\BookInputDto;
use App\ApiState\Admin\Book\BookRemoveProcessor;

#[ApiResource(
shortName: 'Admin/Book',
routePrefix: '/admin',
operations: [
// ...
new Delete(
uriTemplate: '/books/{id}',
processor: BookRemoveProcessor::class
),
// ...
]
)]
class BookDto
{
// ...
}