PHPackages                             halivert/laravel-js-routes - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. halivert/laravel-js-routes

Abandoned → [tightenco/ziggy](/?search=tightenco%2Fziggy)ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

halivert/laravel-js-routes
==========================

Command for use Laravel routes in JS

v6.0.0(2y ago)1113.6k↑153.2%5[1 issues](https://github.com/halivert/laravel-js-routes/issues)MITPHP

Since Nov 3Pushed 2y ago1 watchersCompare

[ Source](https://github.com/halivert/laravel-js-routes)[ Packagist](https://packagist.org/packages/halivert/laravel-js-routes)[ RSS](/packages/halivert-laravel-js-routes/feed)WikiDiscussions 6.x Synced 3d ago

READMEChangelog (10)Dependencies (3)Versions (34)Used By (0)

Laravel JS routes
=================

[](#laravel-js-routes)

Note

This package is not maintained anymore, I suggest you to use [Ziggy](https://github.com/tighten/ziggy) since is a bigger one, with more support.

Anyways, thank you so much for your support 😄

Command for use Laravel routes in JS

Usage:
------

[](#usage)

```
composer require halivert/laravel-js-routes
```

Execute artisan command

```
php artisan route:tojs
```

Add the resource to webpack.mix.js:

```
mix.js("resources/js/routes", "public/js");
```

Or add route function to bootstrap.js as stated in #1 by @clandestine8

```
window.route = require('./routes.js').route;
// You can't use absolute routes with this method.
```

If you want to use absolute urls, you need to have `MIX_APP_URL` .env var

And to use it, you need to import it

```
import { route } from "./routes.js";
```

And voila! you can have the `route` function, the first parameter is the route name (same as in laravel), the second is an array of parameters or an object, and the third is if you want to use absolute paths, by default true.

License
-------

[](#license)

[MIT](https://github.com/halivert/laravel-js-routes/blob/master/LICENSE)

Contributing
------------

[](#contributing)

Pull requests and issues are welcome.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 90.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~51 days

Recently: every ~180 days

Total

32

Last Release

838d ago

Major Versions

v0.1.2 → v2.02019-11-04

v2.2 → v3.02019-11-04

v3.4.1 → v4.02020-09-16

v4.2.3 → v5.02022-02-10

v4.2.4 → v6.0.02023-10-01

### Community

Maintainers

![](https://www.gravatar.com/avatar/004dc6a350fc5bbbab1f1847ca2d76e96426d0622992f19e321aa19a8c0475ba?d=identicon)[halivert](/maintainers/halivert)

---

Top Contributors

[![halivert](https://avatars.githubusercontent.com/u/16197249?v=4)](https://github.com/halivert "halivert (55 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![dansleboby](https://avatars.githubusercontent.com/u/4716382?v=4)](https://github.com/dansleboby "dansleboby (1 commits)")[![geodro](https://avatars.githubusercontent.com/u/289809?v=4)](https://github.com/geodro "geodro (1 commits)")

---

Tags

hacktoberfestjslaravellaravel-routesroutes

### Embed Badge

![Health badge](/badges/halivert-laravel-js-routes/health.svg)

```
[![Health](https://phpackages.com/badges/halivert-laravel-js-routes/health.svg)](https://phpackages.com/packages/halivert-laravel-js-routes)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M151](/packages/laravel-mcp)[api-platform/laravel

API Platform support for Laravel

58171.8k14](/packages/api-platform-laravel)[laravel/surveyor

Static analysis tool for Laravel applications.

86121.4k13](/packages/laravel-surveyor)[webcrafts-studio/lens-for-laravel

A local-first WCAG accessibility auditor for Laravel with axe-core, source mapping, CI workflows, and optional AI fixes.

402.6k](/packages/webcrafts-studio-lens-for-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
