PHPackages                             hsntngr/roux - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. hsntngr/roux

ActiveLibrary[HTTP &amp; Networking](/categories/http)

hsntngr/roux
============

A laravel package that provide to use route names and actions in fetch calls

1.0.0(7y ago)313MITJavaScript

Since Jan 17Pushed 3y ago1 watchersCompare

[ Source](https://github.com/hsntngr/roux)[ Packagist](https://packagist.org/packages/hsntngr/roux)[ RSS](/packages/hsntngr-roux/feed)WikiDiscussions master Synced today

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

Roux API
========

[](#roux-api)

Roux Api provide you to use route names and actions while sending fetch calls in laravel projects Note: Currently under development

**Installation**

install roux via composer

`composer require teomanofficial/roux`

Publish config and asset file of package.

`php artisan vendor:publish --provider="Hsntngr\Roux\RouxServiceProvider" --tag="config" --tag="asset"`

Add roux service provider to providers in `config/app.php`

```
'providers' => [
    // ...
    Hsntngr\Roux\RouxServiceProvider::class
];

```

Add roux.js above your custom javascript files

```

```

Then start to use roux api..

Let assume we have a `user.greetings` route and takes two parameter.

```
Route::get("welcome/{name}/{surname}", function ($name,$surname) {
    return response()->json("Welcome " . $name." ".$surname);
})->name("user.greetings");
```

with roux, you can use route name (user.greetings) as target.

```
roux = new FetchApiWithRoute();

roux.call("user.greetings",["Hasan Teoman","Tıngır"])
    .then(res => console.log(res))
//  welcome Hasan Teoman Tıngır
```

`call()` method takes three parameter, route, route parameters and fetch options. (Post data, headers, token etc.)

But you may pass above information in first parameter as ajax do

```
roux.call({
    method: "GET",
    route: "users.get",
    params: userId
});
```

Instead of route names, also you may use route action as target

```
roux.call({
    method: "POST",
    action: "PostController@store",
    contentType: "json",
    csrf: token,
    data: postData
});

roux.call("PostController@show", postId)
```

By default, roux looks for csrf token in dom and set csrf header.

```

@csrf
{{ csrf_field() }}

```

You can work with any api more elegant way by setting up default roux for each service

```
var postApi = new Roux({
    as: "posts.",
    namespace: "Api"
})
```

now we can sand requests through postApi

```
postApi.call("show", postId)
postApi.call("update", postId, {data: data})
```

Copyright [MIT LICENCE](./LICENSE.MD)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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

2670d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/489114a5dba3dcaebb2b5c7c146a484e519890d0421e5826b71319694e5348c2?d=identicon)[hsntngr](/maintainers/hsntngr)

---

Top Contributors

[![teomanofficial](https://avatars.githubusercontent.com/u/46353718?v=4)](https://github.com/teomanofficial "teomanofficial (16 commits)")

---

Tags

javascriptlaravellaravel-frameworkphp

### Embed Badge

![Health badge](/badges/hsntngr-roux/health.svg)

```
[![Health](https://phpackages.com/badges/hsntngr-roux/health.svg)](https://phpackages.com/packages/hsntngr-roux)
```

###  Alternatives

[danharrin/livewire-rate-limiting

Apply rate limiters to Laravel Livewire actions.

40423.1M27](/packages/danharrin-livewire-rate-limiting)[mateusjunges/laravel-kafka

A kafka driver for laravel

7163.1M17](/packages/mateusjunges-laravel-kafka)[illuminate/http

The Illuminate Http package.

11936.0M5.1k](/packages/illuminate-http)[ricorocks-digital-agency/soap

A SOAP client that provides a clean interface for handling requests and responses.

4281.8M5](/packages/ricorocks-digital-agency-soap)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[laravel-shift/curl-converter

A command line tool to convert curl requests to Laravel HTTP requests.

935.3k](/packages/laravel-shift-curl-converter)

PHPackages © 2026

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