Weave Code
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

Jdd Api Laravel Package

coredump/jdd-api

Laravel package exposing model resources via a simple JSON API and a Vue-friendly client: chain endpoints like $api.users[1].roleObject.users.array(), load rows/arrays, CRUD (post/put/delete), and call model methods with parameters.

View on GitHub
Deep Wiki
Context7

At a glance

Frequently asked questions about Jdd Api
How do I install coredump/jdd-api in a Laravel project?
Run `composer require coredump/jdd-api` in your project root. The package integrates with Laravel’s service container automatically, so no additional configuration is needed unless you’re using custom API endpoints.
Can I use this package with Laravel 10 or newer?
The package is designed for modern Laravel versions (8.x+) and should work with Laravel 10. However, verify compatibility by checking the package’s `composer.json` for PHP/Laravel version constraints, as newer Laravel releases may introduce breaking changes.
How do I chain nested API endpoints like `/users/1/roleObject/users`?
Use fluent chaining: `this.$api.users[1].roleObject.users.array()`. The package maps paths to intuitive JS accessors, so nested relationships are resolved automatically with minimal syntax.
Does coredump/jdd-api support calling server-side model methods (e.g., `evaluate()`)?
Yes. Use `call()`, `arrayCall()`, or `rowCall()` to invoke model methods with parameters. For example, `this.$api.users[1].call('evaluate', {date: today})` sends a POST request to trigger the method remotely.
Is there built-in caching for frequent API calls (e.g., address validation)?
No, the package doesn’t include caching. For production, integrate Redis or Laravel’s caching drivers (e.g., `spatie/laravel-caching`) to cache responses for endpoints like address validation.
How do I handle errors like rate limits or invalid API keys?
The package relies on Guzzle’s HTTP client for requests. Extend it with middleware (e.g., `spatie/fork` for retries) or wrap calls in try-catch blocks to handle Japan Post-specific errors like rate limits or authentication failures.
Can I use this package with Laravel Queues for async processing?
Yes. Dispatch background jobs (e.g., `Bus::dispatch(new TrackDeliveryJob($trackingId))`) to process bulk operations like tracking updates asynchronously, then fetch results later via the API.
Are there alternatives for Japan Post API integration in Laravel?
Consider official SDKs (e.g., Japan Post’s native PHP client) or third-party packages like `ShipEngine` for broader logistics support. However, `coredump/jdd-api` offers a Laravel/Vue-specific fluent syntax tailored for JSON-driven APIs.
How do I test this package in CI/CD without hitting Japan Post’s API?
Mock Guzzle HTTP client responses using Laravel’s `Http` facade or libraries like `mockery`. Stub API calls in tests to validate logic without requiring live API access.
Does the Vue mixin (`ResourceMixin`) work with Laravel Vite or Webpack?
Yes, the mixin is designed to work with both Vite and Webpack. Ensure `window.ResourceMixin` is globally available in your Vue app’s entry point (e.g., `app.js` or `main.js`).
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.
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours