Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Jsrouting Bundle Laravel Package

funddy/jsrouting-bundle

Funddy JSRoutingBundle exposes Symfony routes to JavaScript, letting front-end code generate URLs from route names and parameters without hardcoding paths. It integrates with Symfony routing and provides a lightweight JS helper for client-side links, AJAX calls, and navigation.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

The underlying capability is worth having, even though this package isn't. funddy/jsrouting-bundle solves one narrow but recurring problem: your PHP routes are the single source of truth for URLs, but the JavaScript layer has to hardcode or re-derive them. Every time a route changes, someone greps for string literals, and occasionally someone misses one and you ship a 404. Exposing the route table to the browser as a JSON map (name → path, plus required parameters) removes that entire class of defect.

Concretely, that capability informs these decisions:

  • Feature scoping for any AJAX-heavy or SPA-ish surface. Admin dashboards, filterable tables, multi-step forms, and any UI doing client-side fetches all need URL generation. If route names are available in JS, the frontend can build URLs with parameters instead of string-concatenating query strings. This is the difference between a feature you can iterate on weekly and one where every URL change triggers a frontend/backend coordination meeting.
  • Roadmap sequencing for routing refactors. If you're planning to reorganize URLs (versioning /api/v1, introducing localized route prefixes, splitting a monolith's routes), the cost of that work is largely determined by how many hardcoded URLs exist client-side. A route-exposure layer makes the refactor a backend-only change. That should influence when you schedule the refactor, not just whether.
  • Build vs. buy (really: build vs. adopt vs. adapt). This package is a buy candidate only in the loosest sense — it's a small, unmaintained Symfony2 bundle. Treat it as prior art, not a dependency. The decision it actually supports is "should we invest ~1–3 days in an in-house route manifest endpoint, or adopt a maintained equivalent?" For a Laravel codebase the answer is nearly always Ziggy (actively maintained, first-party-adjacent, Blade + npm integration, tested against current Laravel). For Symfony 4+, there's FOSJsRoutingBundle, which is the direct descendant of this package's idea.
  • Use cases it validates: generating links in Vue/React components, building URLs for fetch calls with route parameters, sharing link-building logic between server-rendered and client-rendered views, and avoiding duplicated route constants across two languages.

Framework mismatch is a blocking fact, not a footnote. The prompt frames this as a Laravel/PHP package; it is a Symfony2 bundle (Symfony2 in the description, Bundle suffix, funddy namespace). Symfony2 reached end-of-life in 2018. If your product is on Laravel — or on Symfony 5/6/7 — this package is not installable in any meaningful sense without a port. That alone converts the decision from "evaluate" to "do not adopt."

When to Consider This Package

Consider it only in these narrow situations:

  • You maintain a legacy Symfony 2.x application that already depends on it, and you're deciding whether to remove it during a migration. In that case, read its source as documentation of the intended behavior so you can replicate it in the target stack.
  • You want a reference implementation — it's a small bundle, and reading how it serializes the Symfony router's route collection into a JS-consumable structure is a reasonable 30-minute investment before you build your own.
  • You are doing due-diligence on build-vs-buy and need to show stakeholders that the off-the-shelf options in this space are thin, which supports the case for a small in-house solution.

Look elsewhere — decisively — if any of the following are true:

  • You're on Laravel. Use tighten/ziggy. It's maintained, handles route parameters and middleware-scoped route filtering, ships a @routes Blade directive and npm package, and is tested against current framework versions. This is not a close call.
  • You're on Symfony 4+. Use friendsofsymfony/fosjsrouting-bundle. It is the maintained successor to this exact idea.
  • You need any of: security review sign-off, a CVE response path, framework upgrade compatibility, or someone to file a bug against. Five stars and zero dependents is a signal that no one has exercised this code in production recently. There is no community to catch regressions and no maintainer obligation to fix them.
  • Your route surface includes anything sensitive. Naively dumping the full route collection to the client leaks internal endpoint names and admin paths. A maintained package at least has documented filtering; this one requires you to audit it yourself.
  • You need per-user or per-role route visibility. That requires auth-aware filtering in the manifest, which no small bundle of this vintage handles out of the box.

How to Pitch It (Stakeholders)

For executives — one paragraph:

There's a real, recurring engineering cost in keeping frontend and backend URLs in sync, and it shows up as broken links and 404s after every routing change. This specific package addresses that problem, but it targets Symfony 2, a framework version that has been end-of-life since 2018, and it has effectively no adoption (single-digit stars, no dependent projects, no maintainer activity). Recommendation: do not adopt. The capability is worth having; this artifact is not the way to get it. For a Laravel codebase, adopting the maintained equivalent (Ziggy) is roughly a half-day of integration work and eliminates the URL-drift defect class permanently. If we'd rather not add a dependency, a small in-house route-manifest endpoint is a 1–3 day build with no ongoing maintenance surface. Either path is cheaper than the status quo over a year.

For engineering — the short version:

The pattern is sound: serialize the named route collection to JSON, filter by middleware/role, expose it via a Blade directive or a build-time artifact, and let the frontend call route('users.show', {id}). The package in question is a Symfony2-era implementation with no dependents and no maintenance, so it's a design reference only. In Laravel, Ziggy implements exactly this pattern and covers the edge cases we'd otherwise rediscover — parameter encoding, optional segments, grouped/prefix middleware filtering, and TypeScript definitions. Two caveats to plan for regardless of implementation: filter the manifest by role so we don't ship admin route names to unauthenticated clients, and version the manifest with the app so a stale cached bundle doesn't generate URLs for routes that no longer exist. If we build in-house, budget the extra day for those two concerns — that's where the actual risk lives, not in the serialization.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings