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)1111.6k—0%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 1mo 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 85% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity34

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

791d 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

3274.9M308](/packages/psalm-plugin-laravel)[watson/active

Laravel helper for recognising the current route, controller and action

3253.6M14](/packages/watson-active)[dragon-code/pretty-routes

Pretty Routes for Laravel

10058.7k4](/packages/dragon-code-pretty-routes)[zonneplan/laravel-module-loader

Module loader for Laravel

24118.4k](/packages/zonneplan-laravel-module-loader)[bjuppa/laravel-blog

Add blog functionality to your Laravel project

483.3k2](/packages/bjuppa-laravel-blog)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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