Download the PHP package eloquage/laravel-wayfinder-forge without Composer
On this page you can find all versions of the php package eloquage/laravel-wayfinder-forge. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download eloquage/laravel-wayfinder-forge
More information about eloquage/laravel-wayfinder-forge
Files in eloquage/laravel-wayfinder-forge
Package laravel-wayfinder-forge
Short Description Auto-generate strongly typed frontend SDKs from Laravel Wayfinder routes.
License MIT
Homepage https://github.com/eloquage/laravel-wayfinder-forge
Informations about the package laravel-wayfinder-forge
Laravel Wayfinder Forge
Auto-generate strongly typed frontend SDKs from your Laravel backend routes and FormRequests.
Requires PHP 8.3+, Laravel 12 or 13, and spatie/laravel-data 4.x.
Wayfinder Forge ensures your frontend client code stays perfectly in sync with your backend validation rules. It parses your Laravel routes, reflects on their FormRequest or Spatie\Data classes, and automatically generates a ready-to-use TypeScript SDK.
Features
- TypeScript Interface Generation: Automatically converts Laravel validation rules (
required,string,nullable,array) into accurate TypeScript interfaces. - Spatie Laravel Data Support: First-class support for
spatie/laravel-dataDTOs. - Multiple Client Support: Generates SDKs formatted for
axios, standardfetch, orinertia. - Customizable Output: Easily define which routes to include/exclude via prefixes and middleware filters.
Installation
You can install the package via composer:
Publish the config file:
Configuration
The published config/wayfinder-forge.php allows you to customize the output behavior:
Usage & Integration
Generate your TypeScript SDK by running the forge command:
Tip: Add this command to your package.json build scripts so it runs automatically during development.
Example: FormRequests
Laravel Controller & Request
Generated TypeScript SDK (resources/js/api/sdk.ts)
Example: Spatie Laravel Data
If you are using spatie/laravel-data to type-hint your controllers instead of FormRequests, Forge handles that automatically.
Laravel Controller & Data Object
Generated TypeScript SDK
Testing
Run the package tests:
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-wayfinder-forge with dependencies
illuminate/contracts Version ^12.0||^13.0
illuminate/database Version ^12.0||^13.0
illuminate/support Version ^12.0||^13.0
spatie/laravel-data Version ^4.0
spatie/laravel-package-tools Version ^1.16