fr3on/laravel-bond 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

fr3on/laravel-bond

最新稳定版本:0.0.1

Composer 安装命令:

composer require fr3on/laravel-bond

包简介

Automatically generate TypeScript types from Laravel API Resources, Form Requests, and Enums for a type-safe frontend.

README 文档

README

GitHub license PHP Version Laravel Version Tests

Generates TypeScript types from Laravel API Resources, Form Requests, and Enums. PHP is the single source of truth—frontend types are never written by hand.

Installation

composer require fr3on/laravel-bond

Usage

Generate types for your configured paths:

php artisan bond:generate

Watch for changes during development:

php artisan bond:watch

Expected Result

The package generates a single TypeScript file (default: resources/js/types/api.ts) containing your definitions:

// auto-generated by laravel-bond — do not edit
// generated: 2026-04-12T10:00:00Z

export interface UserResource {
  id: number
  name: string
  email: string
  avatar: string | null
  roles: RoleResource[]
  created_at: string  // ISO 8601
}

export interface CreateUserRequest {
  name: string
  email: string
  password: string
  role_id: number
}

export type UserStatus = 'active' | 'suspended' | 'pending'

Configuration

Publish the config file:

php artisan vendor:publish --tag=bond-config

Customize paths and output format in config/bond.php.

统计信息

  • 总下载量: 231
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固