PHPackages                             fire015/json-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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. fire015/json-routes

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

fire015/json-routes
===================

Define your routes in laravel using JSON files

v1.0.0(11y ago)318MITPHPPHP &gt;=5.4.0

Since Dec 29Pushed 11y ago1 watchersCompare

[ Source](https://github.com/fire015/json-routes)[ Packagist](https://packagist.org/packages/fire015/json-routes)[ RSS](/packages/fire015-json-routes/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

json-routes
===========

[](#json-routes)

[![Total Downloads](https://camo.githubusercontent.com/9d09eff5a1211e40c8a2a3c9840f9aa2a9296591001a5c34796c0046657a6809/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f666972653031352f6a736f6e2d726f757465732e737667)](https://packagist.org/packages/fire015/json-routes)[![Build Status](https://camo.githubusercontent.com/b999d28a8489316d3291204e2fdc613ab952f31423a1003e4716ffb70c90006a/68747470733a2f2f7472617669732d63692e6f72672f666972653031352f6a736f6e2d726f757465732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/fire015/json-routes)

Define your routes in Laravel using JSON files.

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

[](#installation)

[PHP](https://php.net) 5.4+, [Laravel](http://laravel.com) 4.2+, and [Composer](https://getcomposer.org) are required.

To get the latest version of JSON Routes, simply add the following line to the require block of your `composer.json` file:

```
"fire015/json-routes": "~1.0"

```

You'll then need to run `composer install` or `composer update` to download it and have the autoloader updated.

Once JSON Routes is installed, you need to register the service provider. Open up `app/config/app.php` and add the following to the `providers` key.

`'Fire015\JsonRoutes\JsonRoutesServiceProvider'`

Configuration
-------------

[](#configuration)

To get started, first publish the package config file:

```
$ php artisan config:publish fire015/json-routes
```

This will create a config file which allows you to define the path to the JSON files (by default this is a folder within `app/config` called `routes`).

Usage
-----

[](#usage)

Presuming we have created the `app/config/routes` folder as specified above, create a file in that folder called `routes.json` where we can define our routes. Here is an example of that file:

```
{
	"GET": {
		"/": {
			"uses": "HomeController@showIndex"
		},
		"about": {
			"uses": "AboutController@showIndex"
		}
	},
	"POST": {
		"user/{id}": {
			"uses": "UserController@storeUser"
		}
	}
}

```

You simply define the route URI as the key under each method and the usual route options as if it were an array in the `Route::(get|post|put|patch|delete|options)` static methods.

You can also split your routes up into sub-files and folders. For example you can define `user/account` in any of the following places:

- /user.json
- /user/routes.json
- /user/account.json
- /user/account/routes.json

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

4156d ago

### Community

Maintainers

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

---

Top Contributors

[![fire015](https://avatars.githubusercontent.com/u/501743?v=4)](https://github.com/fire015 "fire015 (9 commits)")

---

Tags

jsonlaravelrouterroute

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/fire015-json-routes/health.svg)

```
[![Health](https://phpackages.com/badges/fire015-json-routes/health.svg)](https://phpackages.com/packages/fire015-json-routes)
```

###  Alternatives

[sbsaga/toon

🧠 TOON for Laravel — a compact, human-readable, and token-efficient data format for AI prompts &amp; LLM contexts. Perfect for ChatGPT, Gemini, Claude, Mistral, and OpenAI integrations (JSON ⇄ TOON).

6115.6k](/packages/sbsaga-toon)[json-mapper/laravel-package

The JsonMapper package for Laravel

25170.4k3](/packages/json-mapper-laravel-package)[garf/laravel-conf

Store additional configs in JSON or Database (write, read)

246.4k](/packages/garf-laravel-conf)

PHPackages © 2026

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