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

Twill Api Laravel Package

area17/twill-api

Twill API adds a RESTful JSON API layer to Twill, Area 17's Laravel CMS. It exposes configurable endpoints for Twill models with authentication, filtering, pagination, and relationships, letting content managed in Twill be consumed by SPAs, mobile apps, or other services.

View on GitHub
Deep Wiki
Context7

Provide a read-only API to Twill models and entities along with base structure to create your own JSON:API compliant REST API.

Frequently asked questions about Twill Api
What is area17/twill-api used for?
area17/twill-api is a Laravel package that adds a read-only REST API layer to Twill, Area 17's Laravel CMS. It exposes Twill models and entities through configurable JSON:API compliant endpoints so content managed in Twill can be consumed by SPAs, mobile apps, partner feeds, or static-site builds. It is not a standalone CMS or a general-purpose API platform; it is a content delivery adapter for existing Twill installations.
How do I install area17/twill-api in a Laravel application?
Install it with Composer in a Laravel application that already runs Twill CMS, then publish and adjust its configuration and routes as needed. The main integration work is mapping Twill models to API resources and configuring serialization, authentication, and exposed routes. Because it depends on Twill, confirm your Laravel, PHP, and Twill versions are compatible before installing.
Which Laravel, PHP, and Twill versions are supported by twill-api?
The package is built for Laravel applications using Twill CMS, but the exact supported Laravel, PHP, and Twill version ranges should be checked in the package's Composer constraints and README before adoption. Twill and Laravel upgrade cadence can outpace smaller packages, so pin versions and test upgrades in CI. Treat version compatibility as a due-diligence gate, especially for long-lived production projects.
Is twill-api read-only, or can it create and update content?
It is read-only by design, providing endpoints to fetch Twill-managed content rather than write workflows. That scope boundary keeps editorial validation, state transitions, and conflict handling inside Twill and your application. If you need write operations or workflow orchestration, the package is an accelerator at best and would require substantial custom work.
How do I expose a Twill model through the twill-api endpoints?
You map Twill models or entities to API resources using the package's base structure and configuration, then expose routes for the models you want to serve. The recommended approach is to start with one low-risk published content model in staging and validate the JSON:API contract with a real consumer before expanding coverage. Deliberately limit which fields, relationships, and locales each resource exposes.
How does authentication work with twill-api?
The package provides the API layer, but authentication and authorization should be designed around your consumers, such as public, partner, or internal access. The assessment recommends keeping the API behind your application's existing auth, rate limiting, caching, and observability layers rather than exposing package routes without controls. Confirm how middleware and route groups are applied in your installation before going live.
Does twill-api support filtering, sorting, pagination, sparse fieldsets, and includes?
The package is designed around JSON:API style delivery and configurable endpoints, and the evaluation calls out filtering, pagination, relationships, sparse fieldsets, and includes as areas to validate. Confirm which of these features are supported out of the box for your version, and test them against real frontend requirements. Relationship includes can cause N+1 queries or oversized payloads, so plan query and cache strategy early.
Will twill-api expose drafts or unpublished content?
Read-only does not automatically mean safe: drafts, revisions, unpublished locales, private media, and relationship includes must be explicitly filtered. You should verify how publication state and locale scoping are applied per resource and per environment. Build tests that assert unpublished content cannot leak through direct endpoints or nested includes.
How does twill-api handle media and image URLs?
Media and image handling is an integration point to validate: determine how media, image transformations, and CDN URLs are represented and invalidated in your API responses. The package exposes Twill entities, but you remain responsible for ensuring private media is not publicly reachable and that URL shapes are stable for consumers. Test transformations and cache invalidation with a real frontend before launch.
Is twill-api production-ready, maintained, and what are the alternatives?
Adoption is low, with roughly 14 GitHub stars noted in the assessment, so treat it as an internal accelerator or reference implementation rather than a strategically differentiated dependency. It is Apache-2.0 licensed, so internal extension or forking is viable, but budget for due diligence and possibly owning patches. Check test coverage, release cadence, and upgrade history, and keep contract tests around resource types, IDs, relationships, and pagination. If you need a broader or write-capable API, evaluate a general-purpose headless CMS or a custom Laravel API layer instead.
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.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect