#route('example.index') helper not available in fresh laravel + react project

1 messages · Page 1 of 1 (latest)

pastel pelican
#

Hey everyone,

I recently started a new project using Laravel 12 + Inertia (React), and I noticed something different compared to a project I built a few months ago.

In my previous setup, I was able to use the route('trainees.index') helper directly inside React components — for example:
<Link href={route('trainees.index')}>Trainees</Link>

However, in this new project (fresh Laravel 12 installation with Inertia starter kit), the route() helper isn’t available anymore.

Did something change recently in how Inertia integrates with Laravel routes?
Was the route() helper previously provided automatically via Ziggy or some other package that’s no longer included by default?

Thanks in advance for any insights!

paper pivot
#

Starter kits used Ziggy, now they use Wayfinder

pastel pelican
#

I wasn’t aware of the change from Ziggy to Wayfinder, that makes total sense now.

pastel pelican
# paper pivot Starter kits used Ziggy, now they use Wayfinder

Out of curiosity, would you say it’s better to stick with Wayfinder going forward? I’m wondering what the main advantages are compared to Ziggy. Is it mostly about performance and bundle size, or does it bring something more in terms of flexibility or maintainability?

paper pivot
pastel pelican
#

Haha well... Thanks for the clarification!

paper pivot
#

At least Wayfinder is maintained and it doesn’t treeshaking, so you only end up with routes in your bundle that are actually used

ruby narwhal
#

Huh, think you meant it is treeshakeable. It's Ziggy that's not able to be treeshakeable with how it creates a JSON blob of route info.

paper pivot
#

Meant “does” 😅

ruby narwhal
#

It's demoed in a ~15m chunk of this keynote: https://youtu.be/CJv5Y7im3Ws?t=1575

Watch the Laravel Keynote from Laracon 2025 featuring major updates: Laravel Boost, Forge with instant VPS provisioning and zero-downtime deployments, Cloud preview environments, Nightwatch updates, new Cloud plans, and many other announcements.

Key Timestamps & Major Announcements:
0:00 - Introduction & 2025 Overview
3:17 - Open Source Framewo...

▶ Play video