abetwothree/laravel-ts-publish
A Laravel package for publishing TypeScript definitions from your application. It streamlines keeping PHP and TypeScript types in sync, reducing manual duplication and helping frontend and backend stay aligned in TypeScript-powered Laravel projects.
DatabaseNotification. These receive interfaces only, so projects expecting metadata or Vite plugin updates for those models must still add them to models.additional_directories. Relation introspection can still depend on runtime state; v2.7.0 prevents such relations from stopping ts:publish, but omitted or unreadable relations need review. Enum and class name collisions remain possible and are surfaced as warnings rather than silently fixed.tsconfig consume the global declaration file, and will the namespace casing change from kebab-case to camelCase affect existing imports? Are auto-published vendor/Laravel model interfaces acceptable in the public type surface? Who triages new ts:publish warnings, and will CI fail on warnings or only on TypeScript errors?ts:publish command should run wherever generated types are produced, ideally in CI and local build scripts. The v2.7.0 fixes align well with projects already using generated model/resource/enum types.ts:publish, inspect the generated diff, run the frontend TypeScript compiler, and resolve any new warnings. Adjust models.excluded, models.included, #[TsExclude], or #[TsEnum] only where the generated surface is intentionally narrowed or renamed. If related models need metadata files or Vite plugin updates, add them to models.additional_directories.tsconfig, especially if the global declaration file is consumed. The release notes indicate --only-resources and --source runs now type morphTo unions consistently with full runs, reducing mode-specific inconsistencies.ts:publish → review new warnings and generated diffs → run frontend typecheck → update include/exclude and enum aliases → commit or publish generated artifacts → deploy. For monorepos or multiple frontends, regenerate all affected type outputs on a feature branch before merge.models.additional_directories just to resolve relation imports, reducing routine maintenance. However, teams still need to maintain exclusion rules, enum aliases, and decisions about whether auto-published vendor models should remain in the generated interface surface. New warnings create explicit maintenance tasks rather than hidden TypeScript failures.{Model}All relation/column collisions. Support may temporarily increase during upgrade as teams triage new warnings and review generated diffs. Document the ts:publish command, warning meanings, and configuration knobs for developers.models.excluded, models.included, and #[TsExclude] to keep vendor or legacy models out of scope. Consider caching or scheduled regeneration if generation becomes slow in CI.ts:publish; it is omitted and should be reviewed. A related model that cannot be read generates a warning. Models whose table does not exist are skipped. Duplicate enum names in one namespace generate warnings. Properties typed by non-generated classes become unknown rather than importing missing files. The global declaration file is now more robust, including multi-word namespace segments and shared names across namespaces.#[TsExclude] and #[TsEnum], and the difference between interface-only auto-published models and models configured for full metadata. TPM oversight should focus on CI gating, warning triage ownership, and review of generated diffs during the v2.7.0 upgrade.How can I help you explore Laravel packages today?