laravel-type-bridge-development

Generate TypeScript/JavaScript types and i18n translations from Laravel PHP definitions.

3|Updated Nov 17, 2025
One-click install
npx skills add https://github.com/GaiaTools/laravel-type-bridge --skill laravel-type-bridge-development
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-type-bridge-development
Source: https://github.com/GaiaTools/laravel-type-bridge/tree/main/boost/skills/laravel-type-bridge
Command: npx skills add https://github.com/GaiaTools/laravel-type-bridge --skill laravel-type-bridge-development

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Laravel backend enums and translation data often require duplication and manual syncing for frontend apps. This skill automates the generation of TypeScript/JavaScript types and i18n translations from PHP definitions, ensuring consistency and reducing manual toil.

Core Features & Use Cases

  • Generate TypeScript/JavaScript enums from PHP backed enums (including those annotated for generation).
  • Generate frontend i18n translation files from Laravel lang files (TS/JS/vue-i18n/i18next outputs).
  • Produce enum translator composables for seamless frontend usage and consistent translation lookups.

Quick Start

Install the package, publish the config, and run the artisan type-bridge:generate to produce frontend enums and translations.

Frequently Asked Questions about laravel-type-bridge-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate TypeScript types from Laravel enums?

You can generate TypeScript types from Laravel enums by running the artisan type-bridge:generate command, which discovers PHP backed enums and outputs corresponding TypeScript/JavaScript type artifacts to your resources/js/ directory.

Can I sync Laravel translation files with frontend i18n frameworks?

Yes, you can sync Laravel translation files with frontend i18n frameworks by generating TS, JS, vue-i18n, or i18next output files from app/lang definitions, ensuring translation keys stay consistent across your backend and frontend.

What are the requirements for bridging Laravel enums to TypeScript?

Bridging Laravel enums to TypeScript requires PHP 8.2+ and Laravel 11.x, along with publishing the package configuration to enable artisan commands that discover, transform, and output generated type files.

How do frontend apps consume PHP-backed enums without manual duplication?

Frontend apps consume PHP-backed enums without manual duplication by using generated TypeScript artifacts and enum translator composables, which provide consistent type definitions and seamless translation lookups directly from Laravel definitions.

Does generating frontend types from Laravel require annotating every enum?

Generating frontend types from Laravel supports both standard PHP backed enums and those specifically annotated for generation, so you do not need to annotate every enum to produce TypeScript output.

What is the best way to maintain consistent translations across Laravel and TypeScript modules?

The best way to maintain consistent translations across Laravel and TypeScript modules is to automate generation from Laravel lang files, producing frontend i18n translation files that eliminate manual syncing and reduce type drift.