spatie/laravel-data
Powerful data objects for Laravel observed · 2026-08-28
Health v2 · maintenance only
89/100
- Activity 89
- Release rhythm 83
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: 13
- age_days: 1937
- days_rel: 117
- days_push: 68
- n_releases_24m: 28
Adoption not part of the score
1782 stars · 288 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A Laravel package for creating rich, typed data objects that can replace form requests, API transformers, and TypeScript definitions. Data is described once and can be validated, transformed into resources, constructed from request data, and exported as TypeScript.
Use cases
- create typed data transfer objects in Laravel
- replace Laravel form requests with data objects
- generate TypeScript definitions from PHP classes
- validate request data automatically in Laravel
- transform data objects into API resources
- avoid duplicating properties across DTOs, resources, and validation
When to choose
- you build Laravel APIs and want typed data flowing in and out
- you're tired of writing the same properties in form requests, transformers, and DTOs
- you want automatic validation rules derived from PHP types
- you share data structures between a Laravel backend and a TypeScript frontend
When to avoid
- you don't use Laravel or PHP 8.1+
- you prefer lightweight DTOs without magic transformation behavior
- your project sticks to plain Laravel form requests and API resources
Facets
library · maturity stable
serialization form-handling middleware api-framework type-system web-development backend developer-tools apis php data-transfer-objects laravel-package validation typescript-generation eloquent dto api-resources laravel
10 sources
- readme: https://github.com/spatie/laravel-data · fetched 2026-08-28 · 300b77dabd89
- homepage: https://spatie.be/docs/laravel-data/ · fetched 2026-08-29 · 3e9bd86ff7f6
- site_page: https://spatie.be/docs/laravel-data/v2 · fetched 2026-08-29 · 63f1f849ecbf
- site_page: https://spatie.be/docs/laravel-data/v1 · fetched 2026-08-29 · 429a7c6ca108
- site_page: https://spatie.be/docs · fetched 2026-08-29 · 08e024d86d95
- site_page: https://spatie.be/about-us · fetched 2026-08-29 · d3cb88e4b34c
- site_page: https://spatie.be/docs/laravel-data/v4 · fetched 2026-08-29 · 3e9bd86ff7f6
- site_page: https://spatie.be/docs/laravel-data/v3 · fetched 2026-08-29 · 90e6420404bb
- site_page: https://spatie.be/docs/laravel-data/v4/support-us · fetched 2026-08-29 · 6616cb52aab0
- site_page: https://spatie.be/docs/laravel-data/v4/requirements · fetched 2026-08-29 · cea42177b977
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| spatie/laravel-data | main | 89 |
For agents
markdown · JSON · MCP: product_card(name="spatie/laravel-data")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem