| 1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- namespace Webkul\BagistoApi\Models;
- use ApiPlatform\Metadata\ApiProperty;
- use ApiPlatform\Metadata\ApiResource;
- use ApiPlatform\Metadata\Get;
- use ApiPlatform\Metadata\GetCollection;
- use ApiPlatform\Metadata\GraphQl\Query;
- use ApiPlatform\Metadata\GraphQl\QueryCollection;
- use Webkul\BagistoApi\Resolver\BaseQueryItemResolver;
- use Webkul\BagistoApi\State\CursorAwareCollectionProvider;
- #[ApiResource(
- routePrefix: '/api/shop',
- operations: [
- new Get,
- new GetCollection,
- ],
- graphQlOperations: [
- new Query(resolver: BaseQueryItemResolver::class),
- new QueryCollection(provider: CursorAwareCollectionProvider::class),
- ]
- )]
- class Currency extends \Webkul\Core\Models\Currency
- {
- /**
- * API Platform identifier
- */
- #[ApiProperty(identifier: true, writable: false)]
- public function getId(): int
- {
- return $this->id;
- }
- }
|