PHPackages                             rootlogin/jsrouting-provider - 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. [Framework](/categories/framework)
4. /
5. rootlogin/jsrouting-provider

AbandonedArchivedLibrary[Framework](/categories/framework)

rootlogin/jsrouting-provider
============================

javascript routing provider for the silex framework

v1.0.1(10y ago)37.5k5[1 PRs](https://github.com/chrootlogin/jsrouting-provider/pulls)GPL-3.0+PHPPHP &gt;=5.4

Since Feb 9Pushed 9y ago1 watchersCompare

[ Source](https://github.com/chrootlogin/jsrouting-provider)[ Packagist](https://packagist.org/packages/rootlogin/jsrouting-provider)[ Docs](https://rootlogin.ch)[ RSS](/packages/rootlogin-jsrouting-provider/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

Silex JSRouting Provider
========================

[](#silex-jsrouting-provider)

The JSRouting Provider is a silex routing provider for javascript, that exposes routes to a javascript file. Then you can generate routes for use with javascript frameworks like AngularJS.

[![Build Status](https://camo.githubusercontent.com/09320ec0117a0e3ed149c43f622cc4b5961b64c2757e7bc1e1595cb105fc18ab/68747470733a2f2f6170692e7472617669732d63692e6f72672f6368726f6f744c6f67696e2f6a73726f7574696e672d70726f76696465722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/chrootlogin/jsrouting-provider)[![Total Downloads](https://camo.githubusercontent.com/57aade22bc13d7d71e89320b763fd61ca10e4889553793dba2771dd4c6acbf82/68747470733a2f2f706f7365722e707567782e6f72672f726f6f746c6f67696e2f6a73726f7574696e672d70726f76696465722f646f776e6c6f6164732e706e67)](https://packagist.org/packages/rootlogin/jsrouting-provider)[![Latest Stable Version](https://camo.githubusercontent.com/17b10b1d73931fb79c7e11c0c13e97bc737f7f7cf04d1fc8ccd37e15a23ba436/68747470733a2f2f706f7365722e707567782e6f72672f726f6f746c6f67696e2f6a73726f7574696e672d70726f76696465722f762f737461626c652e706e67)](https://packagist.org/packages/rootlogin/jsrouting-provider)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/56f06d849064dd8e794aa9bcb3ffbac65a6efe98080f4b48ebfadcff3507fe7b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6368726f6f744c6f67696e2f6a73726f7574696e672d70726f76696465722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/chrootLogin/jsrouting-provider/?branch=master)

Installation
------------

[](#installation)

Add the provider to your composer.json

```
{
  "requires": {
    "rootlogin/jsrouting-provider": "~1.0"
  }
}

```

Register the provider in your silex application:

```
$app->register(new rootLogin\JSRoutingProvider\Provider\SilexJSRoutingServiceProvider(), array(
  "jsrouting.base_url" => "/",
  "jsrouting.exposed_routes" => array("routeA", "routeB")
  ));

```

Set the route option *expose* to *true*.

```
$controllers->get("/hello", function() {
    return "hello world"!
})->bind("hello")->getRoute()->setOption("expose",true);

```

Include and use it in your frontend like this.

```

  console.log(router.generate("routeA"));
  console.log(router.generate("routeB", {id: 3}));

```

Console
-------

[](#console)

If you want to use the console commands please install at least [saxulum/saxulum-console](https://github.com/saxulum/saxulum-console). It will be automatically activated after you registered the provider.

### Available Commands

[](#available-commands)

- **jsrouting:dump**: This dumps the router with the known routes (buggy, ATM);
- **jsrouting:dump:router.js**: This only dumps the router.js. You need to add the routes manually.

Run the tests
-------------

[](#run-the-tests)

Go to the base directory of the jsrouting-provider. Do a `composer install` and enter `vendor/bin/phpunit`.

### Run the javascript tests

[](#run-the-javascript-tests)

Do a `npm install` and enter `node_modules/.bin/gulp test`. Or if you have installed gulp globally enter `gulp test`.

Contribution
------------

[](#contribution)

Pull request are welcome. Or if you can't or want code you can also contribute by opening a ticket if you see something is wrong.

Warning
-------

[](#warning)

This project is in early development stages. No warranty if it kills your kittens or starts a nuclear war ;)

###  Health Score

32

—

LowBetter than 71% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.1% 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 ~3 days

Total

2

Last Release

3737d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.3

v1.0.1PHP &gt;=5.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/bd92a774c3fad26c39b44a602910902b30f1f823cd602ca0da747dc60918472d?d=identicon)[rootlogin](/maintainers/rootlogin)

---

Top Contributors

[![chrootlogin](https://avatars.githubusercontent.com/u/4862947?v=4)](https://github.com/chrootlogin "chrootlogin (27 commits)")[![m-idler](https://avatars.githubusercontent.com/u/2026873?v=4)](https://github.com/m-idler "m-idler (2 commits)")

---

Tags

javascriptroutingsilex

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rootlogin-jsrouting-provider/health.svg)

```
[![Health](https://phpackages.com/badges/rootlogin-jsrouting-provider/health.svg)](https://phpackages.com/packages/rootlogin-jsrouting-provider)
```

###  Alternatives

[vesparny/silex-simple-rest

A simple silex skeleton for rest api

3336.8k](/packages/vesparny-silex-simple-rest)[ddesrosiers/silex-annotation-provider

A silex service provider that allows the use of annotations in ServiceControllers.

25246.7k3](/packages/ddesrosiers-silex-annotation-provider)[tobiassjosten/responsible-service-provider

A Silex ServiceProvider for automagic response formatting.

3490.8k](/packages/tobiassjosten-responsible-service-provider)[propel/propel-service-provider

Propel integrationfor Silex.

2625.2k3](/packages/propel-propel-service-provider)

PHPackages © 2026

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