spatie/typescript-transformer
Automatically generate TypeScript definitions from your PHP/Laravel code. spatie/typescript-transformer scans classes and types, then outputs .d.ts files so your frontend stays in sync with backend models, DTOs and enums with minimal manual typing.
It is possible to have TypeScript transformer watch your PHP files for changes and automatically update the generated TypeScript files. You can do this by running:
php artisan typescript:transform --watch
For more information about how watch mode works under the hood, see the watch mode section.
How can I help you explore Laravel packages today?