PHPackages                             famousinteractive/content-api - 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. [API Development](/categories/api)
4. /
5. famousinteractive/content-api

ActiveLibrary[API Development](/categories/api)

famousinteractive/content-api
=============================

Allow to get translations via an Api and specific helper

v0.14(8y ago)03721GPL-3.0+PHPPHP &gt;=5.6

Since Apr 26Pushed 8y ago1 watchersCompare

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

READMEChangelog (9)Dependencies (1)Versions (10)Used By (0)

contentApi
==========

[](#contentapi)

Set up a package to load translation from centralized api

Basic Installation
------------------

[](#basic-installation)

- `composer require famousinteractive/content-api`
- Add `Famousinteractive\ContentApi\ContentApiServiceProvider::class` in serviceProvider in config/app.php
- Publish the config file : `php artisan vendor:publish`
- Create the project on the translation platform
- Launch the command `php artisan famousContentApi:initialize` to generate the config file

Usage
-----

[](#usage)

- use `fitrans($key, $params = [], $lang = null, $default = '') ` to use the translation via the Content Api.

Dataset
-------

[](#dataset)

- To get the data of a dataset, use the function `fitds($datasetName, $prefixLang = false, $param=[], $useCache=true)`

    - `$datasetName` is the unique name of the dataset
    - `$prefixLang` Boolean allowing you to use a different dataset for each language.
    - `$param` string with the data to return. Values :
        - "fields" Just the list and the type of the fields.
        - "datas" All entries in the dataset with information on the fields.
        - "formatted" An array with the association with Field =&gt; value and no more data.
        - "All" All these data in once. By default
    - `$useCache` Boolean. True by default. If you get data who change often (like dataset to store user data for example), you may prefer to not cache the result.
- To put new record in a dataset, use the function `fitpushds($datasetName, $data=[], $prefixLang = false)`

    - `$datasetName` and `$prefixLang` have the same behavior as for fitds() function
    - `$data` is an array with an association of field name and value.
        - `[ 'lastname'  => 'Dillenbourg', 'firstname'     => 'Jérémy', 'birtdate'         => '1990-07-03' ]`
    - The return is either true or an array `['success' => false, 'message' => 'error_description']` . The fields are validated by the rules set in the platform. If the validation fails, you'll receive an error response.

Extra
-----

[](#extra)

- You can call `/fit-content-api-clear-cache?clientId=xxxxxx` in order to clear the cache of the website
- You can run `php artisan famousContentApi:collect ` to collect all the fitrans() reference and send them to the platform.
- You can force to render all the translation key by adding paremeters to the url of your website
    - `?fitrans=display_keys&exclusion=routes`
    - fitrans=display\_keys render all the keys, fitrans=edit\_keys generate html tags handled by the chrome extension
    - exlusion exlude some pattern. Here all keys starting by `routes.`. It's usefull if you use fitrans() in the route file.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

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

Every ~28 days

Total

9

Last Release

3128d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5048337?v=4)[Dillenbourg Jérémy](/maintainers/jeremy379)[@jeremy379](https://github.com/jeremy379)

---

Top Contributors

[![jeremy379](https://avatars.githubusercontent.com/u/5048337?v=4)](https://github.com/jeremy379 "jeremy379 (1 commits)")

### Embed Badge

![Health badge](/badges/famousinteractive-content-api/health.svg)

```
[![Health](https://phpackages.com/badges/famousinteractive-content-api/health.svg)](https://phpackages.com/packages/famousinteractive-content-api)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.3M7](/packages/avalara-avataxclient)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2478.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1942.4k4](/packages/aimeos-prisma)

PHPackages © 2026

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