Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Zatona Eg Api

Zatona Eg Api Laravel Package

zatona-eg/zatona-eg-api

View on GitHub
Deep Wiki
Context7

Bagisto API Platform package with GraphQL and REST API support

Frequently asked questions about Zatona Eg Api
Can I use zatona-eg-api for a non-e-commerce Laravel project?
This package is tightly coupled with Bagisto’s e-commerce models and services. While you could repurpose the API layer for other domains, you’d need to replace Bagisto’s Eloquent models, services, and business logic, which requires significant refactoring. For non-e-commerce use cases, consider alternatives like API Platform standalone or custom-built GraphQL/REST APIs.
What Laravel versions does zatona-eg-api support?
The package requires **Laravel 10+** due to its dependency on API Platform v4.x, which mandates PHP 8.3+. If you’re using Laravel 9 or older, you’ll need to upgrade your Laravel installation or fork the package to support older versions, which may introduce compatibility risks.
How do I install zatona-eg-api without Bagisto?
You cannot install this package without Bagisto v2.3.8+ because it relies on Bagisto’s core models and service providers. To use it in a non-Bagisto Laravel app, you’d need to manually mock Bagisto’s dependencies (e.g., Webkul namespaces) or create a custom wrapper layer to abstract Bagisto-specific logic.
Does zatona-eg-api support custom GraphQL queries or mutations?
The GraphQL schema is auto-generated from Bagisto’s models, so custom queries or mutations require extending the schema via API Platform’s configuration. You’ll need to define custom resolvers or override the default schema in `config/api_platform/graphql.php` or by creating a custom `GraphQLContext` class.
What databases are supported by zatona-eg-api?
The package supports **MySQL 8.0+** and **PostgreSQL 14+** out of the box, as it inherits Bagisto’s database requirements. SQLite or other databases are unsupported, and schema migrations may fail if your tables don’t match Bagisto’s structure.
How do I secure the auto-generated REST/GraphQL APIs?
By default, the package likely relies on Bagisto’s authentication (e.g., Sanctum or JWT). To secure APIs, configure middleware in `app/Http/Kernel.php` or use API Platform’s built-in security providers. For GraphQL, add authentication guards in the `GraphQLContext` or use API Platform’s `@Security` attribute on types.
Are there performance optimizations for high-traffic APIs?
The package auto-generates APIs without built-in optimizations. For high traffic, manually configure caching (e.g., Redis for API Platform’s `CacheItemPersister`), enable pagination (`?pagination=itemsPerPage`), and use query complexity analysis in GraphQL to prevent over-fetching. Rate limiting should be added via Laravel middleware.
Can I use zatona-eg-api with OAuth2 or Passport?
The package doesn’t natively support OAuth2 or Passport, as it depends on Bagisto’s auth system. To integrate OAuth2, replace Bagisto’s auth logic with Laravel Passport or a custom OAuth2 provider, then update the API Platform security configuration to use your new auth system.
How do I test zatona-eg-api in a CI/CD pipeline?
Test the package by running `php artisan test` after installing it in a fresh Laravel/Bagisto environment. Focus on API endpoints (e.g., `GET /api/products`, GraphQL queries) and authentication flows. Use tools like Pest or PHPUnit to mock Bagisto dependencies if needed, and validate responses against Swagger/OpenAPI specs.
What alternatives exist for Laravel GraphQL/REST APIs?
For non-e-commerce projects, consider **API Platform** (standalone), **Lighthouse**, or **GraphQL PHP**. For REST APIs, **Laravel’s built-in routes** or **Spatie’s Laravel API Resources** are lighter alternatives. If you need Bagisto-specific APIs, this package is currently the only option, but its immaturity may warrant custom development.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc
animalyoung/laravel-influxdb
onix-solutions/sms-telera
lonely-lights/prosetta
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log