PHPackages                             fr3on/laravel-bond - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. fr3on/laravel-bond

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

fr3on/laravel-bond
==================

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

0.0.1(3mo ago)0231MITPHPPHP ^8.2CI passing

Since Apr 12Pushed 3mo agoCompare

[ Source](https://github.com/fr3on/laravel-bond)[ Packagist](https://packagist.org/packages/fr3on/laravel-bond)[ RSS](/packages/fr3on-laravel-bond/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

Laravel Bond
============

[](#laravel-bond)

[![GitHub license](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)[![PHP Version](https://camo.githubusercontent.com/82aff4c49bf07db75f6ce5a63ab76a3e48a07ce938f15c5560101e49379e9969/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253230382e322532422d3737376262342e737667)](https://camo.githubusercontent.com/82aff4c49bf07db75f6ce5a63ab76a3e48a07ce938f15c5560101e49379e9969/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253230382e322532422d3737376262342e737667)[![Laravel Version](https://camo.githubusercontent.com/11208845eb5b5e360e4d372dda2a5354da43559c97c3aba769326f3c71726d72/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d31302d2d31332d6666326432302e737667)](https://camo.githubusercontent.com/11208845eb5b5e360e4d372dda2a5354da43559c97c3aba769326f3c71726d72/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d31302d2d31332d6666326432302e737667)[![Tests](https://camo.githubusercontent.com/dc04e4a10589933080325de49f7af7b732b53559934272527ee7abd22bb7a6d5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f74657374732d706573742d3030623162392e737667)](https://camo.githubusercontent.com/dc04e4a10589933080325de49f7af7b732b53559934272527ee7abd22bb7a6d5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f74657374732d706573742d3030623162392e737667)

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
------------

[](#installation)

```
composer require fr3on/laravel-bond
```

Usage
-----

[](#usage)

Generate types for your configured paths:

```
php artisan bond:generate
```

Watch for changes during development:

```
php artisan bond:watch
```

Expected Result
---------------

[](#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
-------------

[](#configuration)

Publish the config file:

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

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

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance80

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

103d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/205356416?v=4)[fr3onv](/maintainers/fr3onv)[@fr3onv](https://github.com/fr3onv)

---

Top Contributors

[![fr3on](https://avatars.githubusercontent.com/u/26393383?v=4)](https://github.com/fr3on "fr3on (2 commits)")[![ahmardi](https://avatars.githubusercontent.com/u/141551822?v=4)](https://github.com/ahmardi "ahmardi (1 commits)")

---

Tags

api-resourceenumsform-requestlaravelphptype-generatortype-safetytypescriptlaraveltypescriptenumsform-requesttype-safetyapi resourcetype-generator

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/fr3on-laravel-bond/health.svg)

```
[![Health](https://phpackages.com/badges/fr3on-laravel-bond/health.svg)](https://phpackages.com/packages/fr3on-laravel-bond)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[vinkius-labs/laravel-page-speed

Laravel Page Speed

2.5k12.5k1](/packages/vinkius-labs-laravel-page-speed)[emargareten/inertia-modal

Inertia Modal is a Laravel package that lets you implement backend-driven modal dialogs for Inertia apps.

90142.9k](/packages/emargareten-inertia-modal)[wearepixel/laravel-cart

A cart implementation for Laravel

1374.8k](/packages/wearepixel-laravel-cart)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
