Skip to content

Commit 4aa690b

Browse files
committed
docs: expand comparison section with advantages of Model Typer over Laravel Wayfinder
1 parent d49b4d4 commit 4aa690b

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

readme.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,28 @@ Model Typer is a powerful tool designed for developers working with Laravel and
1515
simplify the generation of TypeScript interfaces from Laravel models, enhancing type safety and consistency in your
1616
applications.
1717

18+
## Why Model Typer over Laravel Wayfinder?
19+
20+
Laravel's first-party [Wayfinder](https://github.com/laravel/wayfinder) package is adding Eloquent model TypeScript
21+
support on its `dev-next` branch. Model Typer has been doing this in production for years. A few things worth knowing
22+
before switching:
23+
24+
- **It's already stable.** Model Typer is versioned and running in production across a lot of apps. Wayfinder's model
25+
support is still in beta with an explicit note that _"the API is subject (and likely) to change prior to the v1.0.0
26+
release."_
27+
28+
- **No dev dependencies.** Getting Wayfinder's model support requires `composer require laravel/wayfinder:dev-next`,
29+
which locks you to an untagged, moving branch instead of a proper release.
30+
31+
- **Models are the whole point.** Wayfinder is primarily a route and controller typing tool. Model support is being
32+
added on top of that. Model Typer was built specifically for this use case from the start.
33+
34+
- **More output options.** Model Typer generates columns, accessors, relationships, counts, exists, sums, and custom
35+
mappings with a lot of configuration options. Wayfinder's model output is still fairly basic by comparison.
36+
37+
Once Wayfinder hits a stable v1.0.0 with solid model support it will be worth a proper look. Until then, Model Typer
38+
is the practical choice.
39+
1840
## Upgrade Guide
1941

2042
Please read the upgrade guide [here](https://github.com/fumeapp/modeltyper/UPGRADE.md)

0 commit comments

Comments
 (0)