Tooling

Deployment

Compile the definitions for production.

Definitions are compiled on first use. In production, compile them all at deployment:

Terminal
php artisan optimize          # runs jsonapi:cache (and revision:cache)
CommandEffect
php artisan jsonapi:cacheCompiles every definition, at every revision, into bootstrap/cache/jsonapi.php
php artisan jsonapi:clearRemoves the compiled definitions (run by optimize:clear)

The resources are looked for in definitions.paths (the app directory by default).

Run php artisan jsonapi:check --strict in CI before deploying: a definition that cannot be compiled fails there rather than on the first request.