PHPackages                             infinity-it/tools - 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. infinity-it/tools

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

infinity-it/tools
=================

0149JavaScript

Since Jun 22Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/INFINITY-IT/tools)[ Packagist](https://packagist.org/packages/infinity-it/tools)[ RSS](/packages/infinity-it-tools/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Tools
=====

[](#tools)

### 1. Installation

[](#1-installation)

```
composer require "infinity-it/tools"
```

### 2. required packages

[](#2-required-packages)

- package.json

    ```
    {
      "dependencies": {
        "tools": "file:vendor/infinity-it/tools"
      }
    }
    ```
- run

    ```
    npm i
    ```

### 3. usage

[](#3-usage)

```
import { /* ... */} from 'tools'
```

### 4. Refresh Token

[](#4-refresh-token)

updates the token in all relevant locations (Axios headers, meta tags, and input fields), and optionally runs a callback with the new token and authentication data.

- route

    ```
    use \App\Http\Middleware\VerifyCsrfToken;
    Route::post('refreshToken', fn() => refreshToken())->withoutMiddleware(VerifyCsrfToken::class)->name('refreshToken');
    ```
- js

    - use: ```
        import {csrf_update} from 'tools'
        import route from 'ziggy-js'

        csrf_update(route('refreshToken'), 'guard-name', /*callback(token, authData)*/null, axios)
        ```
    - globally use:

    ```
    axios.interceptors.response.use(
        response => response,
        async error => {
            const originalRequest = error.config
            if (error.response && error.response.status === 419 && !originalRequest._retry) {
                originalRequest._retry = true
                return new Promise((resolve, reject) => {
                    csrf_update(route('refreshToken'), 'web', (token, authData) => {
                        originalRequest.headers['X-CSRF-TOKEN'] = token
                        axios(originalRequest)
                            .then(resolve)
                            .catch(reject)
                    }, axios)
                })
            }
            return Promise.reject(error)
        }
    )
    ```

### 5. app translate

[](#5-app-translate)

- app.blade.php

```

    window._locale = '{{ app()->getLocale() }}'
    window._translations = {!! cache('translations') !!};

```

- app.js

```
import {__, trans} from 'tools'
```

- **Provider**
    - **Laravel 10** and below: `config/app.php````
        'providers' => [
            ...
            /*
            * Package Service Providers...
            */
            InfinityIt\Tools\Providers\TranslationServiceProvider::class,
            ...
        ]
        ```
    - **Laravel 11** and above : `bootstrap/providers.php````
        return [
            ...
            InfinityIt\Tools\Providers\TranslationServiceProvider::class,
        ];
        ```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance61

Regular maintenance activity

Popularity12

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/34744091?v=4)[Captiv Solutions](/maintainers/bestweb-be)[@bestweb-be](https://github.com/bestweb-be)

### Embed Badge

![Health badge](/badges/infinity-it-tools/health.svg)

```
[![Health](https://phpackages.com/badges/infinity-it-tools/health.svg)](https://phpackages.com/packages/infinity-it-tools)
```

###  Alternatives

[wire-elements/spotlight

Livewire component that provides Spotlight/Alfred-like functionality to your Laravel application.

9471.1M3](/packages/wire-elements-spotlight)[matomo/referrer-spam-list

Community-contributed list of referrer spammers

6761.3M22](/packages/matomo-referrer-spam-list)[aoepeople/zettr

Manage and apply settings (formerly known as EnvSettingsTool)

209.9k](/packages/aoepeople-zettr)

PHPackages © 2026

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