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
Voyager Api

Voyager Api Laravel Package

joy/voyager-api

Joy/Voyager API is a Laravel package that adds RESTful endpoints to Voyager’s admin panel, exposing BREAD/CRUD resources as JSON APIs for SPAs and external clients. Configure models and query Voyager-managed data with minimal setup.

View on GitHub
Deep Wiki
Context7

joy/voyager-api adds a RESTful API layer to Laravel’s Voyager admin panel, making BREAD-managed resources accessible to frontend apps, mobile clients, and integrations. It fits into existing Laravel projects and helps expose admin data without building custom controllers for every table.

  • CRUD endpoints for Voyager BREAD resources
  • Authentication-ready access for protected routes
  • Pagination and filtering for large datasets
  • Laravel-native configuration and installation
  • Extensible controllers and services for custom endpoints
Frequently asked questions about Voyager Api
What is joy/voyager-api and when should I use it?
Joy VoyagerApi is a Composer package that adds REST API endpoints to the Voyager admin panel for Laravel. It turns Voyager BREAD resources and admin data into HTTP endpoints with Passport authentication and Swagger documentation. Use it when Voyager is already your admin and BREAD backbone and you want to expose those CRUD configurations through an API without hand-writing every controller.
How do I install joy/voyager-api in a Laravel application?
Install it with Composer, then publish its configuration and routes according to the README. You will also need Laravel Passport configured and Swagger generation set up for the API documentation. Because the package is low maturity, verify the published routes, middleware, and auth guards before exposing any endpoint beyond a local spike.
Which Laravel, PHP, and Voyager versions does joy/voyager-api support?
The current release dates from February 2024 and is aimed at Voyager 1.x-era applications, so you must check its Composer constraints before adoption. Compatibility with Laravel 10, Laravel 11, and newer PHP versions is not proven by the context provided and may require patching. Treat version verification and CI testing as the first gate, especially if you plan to upgrade Laravel later.
Does joy/voyager-api use Passport or Sanctum for authentication?
The package description states Passport support, so it assumes Laravel Passport token authentication rather than Sanctum by default. You still need to verify the middleware, guards, and token scopes in the published routes. Authorization should be mapped explicitly to Voyager permissions or Laravel policies instead of being assumed from authentication alone.
How does joy/voyager-api generate Swagger/OpenAPI documentation?
It generates Swagger documentation from the Voyager BREAD resources and exposed API endpoints. Treat that output as a generated artifact, not authoritative documentation, because BREAD definitions can change after generation. Add OpenAPI contract tests and regenerate docs as part of your deployment process to keep them accurate.
Are the generated Voyager API endpoints safe for production write operations?
Do not assume they are safe by default. Auto-generated CRUD endpoints can expose mass-assignment risks, unintended field exposure, missing validation, and unclear soft-delete behavior. Before enabling writes, add authorization checks, validation rules, field filtering, pagination caps, and negative tests for unauthorized field access.
Does joy/voyager-api support pagination, filtering, eager loading, file uploads, and soft deletes?
The package exposes Voyager BREAD resources over HTTP, but the context does not confirm predictable support for every advanced feature. Test pagination limits, filtering behavior, eager loading, uploads, and soft deletes against representative endpoints. Where behavior is missing or unsafe, customize the generated controllers or add response shaping before production use.
How do generated endpoints handle Voyager model events, observers, and custom BREAD rows?
Endpoints that use standard Voyager Eloquent models should trigger normal model events and observers for create, update, and delete operations. Custom BREAD rows, raw queries, or nonstandard model handling may bypass those events, so verify each resource. Test observers, audit logging, and tenant scoping explicitly before relying on generated endpoints.
Is joy/voyager-api actively maintained and reliable enough for production?
The package has limited production evidence, with only 19 stars and zero dependents reported, and its last release was February 2024. The broader Voyager ecosystem is stagnant, so Laravel upgrades may strand the package. It is MIT licensed and small enough to fork, but production use should include an internal owner willing to patch and test it.
What alternatives exist to joy/voyager-api for exposing Voyager BREAD data as an API?
You can write Laravel API controllers and API Resources directly against Voyager models, giving you full control over validation, authorization, pagination, and response shaping. You can also fork joy/voyager-api and maintain it internally if the BREAD-to-REST mapping is valuable. For new projects, consider an actively maintained admin package with a stronger API story instead of adding a legacy Voyager dependency.
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.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console