Laravel has introduced Wayfinder, a new package that enables the generation of fully-typed, importable TypeScript functions for controllers and named routes, streamlining integration between Laravel backends and TypeScript frontends. This tutorial demonstrates setting up Wayfinder in a Laravel project, creating necessary models, controllers, routes, and generating TypeScript definitions. Wayfinder simplifies maintaining type-safe routes, improving the developer experience in full-stack Laravel applications.
Table of contents
Post MigrationAdding PostsCreate our PostControllerAdd Post RoutesInstalling WayfinderUsing our new definitionsForms with WayfinderConclusion4 Comments
Sort: