PHPackages                             chatbox/tmp-data - 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. chatbox/tmp-data

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

chatbox/tmp-data
================

temp data provider

016PHP

Since Jan 22Pushed 11y ago2 watchersCompare

[ Source](https://github.com/chatbox-inc/tmp-data)[ Packagist](https://packagist.org/packages/chatbox/tmp-data)[ RSS](/packages/chatbox-tmp-data/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

tmp kvs
=======

[](#tmp-kvs)

一時的なKVS形式のデータを取り扱う際のユーティリティ

Usage
-----

[](#usage)

```
$tmpData = new \TmpData\TempDataProvider([
    "tableName" => "tmp_token",
    "dns" => "mysql://hogehoge"
]);

$tmpData->set($key,$value); // write data

$token = $tmpData->pickUp($key); //read data and update timestamp
$token = $tmpData->read($key); //just read data

//token will be null or \Chatbox\TempData Object

if($token->isUsable()){ // check if token in term
    $key = $token->key;
    $value = $token->value;
    $createdAt = $token->createdAt;
    $updatedAt = $token->updatedAt;
    $expiredAt = $token->expiredAt;
    $accessedAt = $token->accessedAt;
    $deletedAt = $token->deletedAt;
}

$token->update($value); // update data
$token->delete(); // soft delete

$tmpData->flush(); // delete all data

```

schema
------

[](#schema)

key string value string createdAt timestamp updatedAt timestamp accessedAt timestamp expiredAt timestamp deletedAt timestamp

Simply you can use `\Chatbox\TmpData\SchemaBuilder` to generate Builder Closure

```
# in laravel4

Schema::create('tmp_token', new \Chatbox\TmpData\SchemaBuilder());

Schema::create('tmp_confirm_mail', new \Chatbox\TmpData\SchemaBuilder([
    "useAccessedAt" => false,
    "defaultExpiredAt" => "200000",
]));

```

 \[ "cb\_room" =&gt; function(Blueprint $table){ $table-&gt;unsignedInteger("id",true); $table-&gt;string("srug"); $table-&gt;unsignedInteger("tenants"); $table-&gt;text("prop"); $table-&gt;dateTime("created\_at"); $table-&gt;dateTime("updated\_at"); }, "cb\_room\_tag" =&gt; function(Blueprint $table){ $table-&gt;unsignedInteger("id",true); $table-&gt;unsignedInteger("room\_id"); $table-&gt;string("type"); $table-&gt;string("value"); $table-&gt;dateTime("created\_at"); $table-&gt;dateTime("updated\_at"); }, "cb\_user" =&gt; function(Blueprint $table){ $table-&gt;unsignedInteger("id",true); $table-&gt;string("name"); $table-&gt;string("enter\_key"); $table-&gt;text("prop"); $table-&gt;dateTime("created\_at"); $table-&gt;dateTime("updated\_at"); }, "cb\_user\_tag" =&gt; function(Blueprint $table){ $table-&gt;unsignedInteger("id",true); $table-&gt;unsignedInteger("user\_id"); $table-&gt;string("type"); $table-&gt;string("value"); $table-&gt;dateTime("created\_at"); $table-&gt;dateTime("updated\_at"); }, "cb\_tenants" =&gt; function(Blueprint $table){ $table-&gt;unsignedInteger("id",true); $table-&gt;unsignedInteger("room\_id"); $table-&gt;unsignedInteger("user\_id"); $table-&gt;boolean("is\_kicked"); $table-&gt;dateTime("created\_at"); $table-&gt;dateTime("updated\_at"); }, "cb\_message" =&gt; function(Blueprint $table){ $table-&gt;unsignedInteger("id",true); $table-&gt;unsignedInteger("room\_id"); $table-&gt;unsignedInteger("user\_id"); $table-&gt;string("type"); $table-&gt;text("message"); $table-&gt;dateTime("created\_at"); $table-&gt;dateTime("updated\_at"); }, \], "seeds" =&gt; \[ \["master\_user",function(Builder $builder){ $builder-&gt;insert(\[ "name"=&gt;"Tom", "sex" =&gt; "1" \]); }\], \], "include" =&gt; \[ "user" =&gt; \_\_DIR\_\_."/data/user.php" \] \];

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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://www.gravatar.com/avatar/d4341b789304ab56cc60e3891bbd51c6a4aa12e0e4ffff977eb3de385796cf01?d=identicon)[chatbox-inc](/maintainers/chatbox-inc)

### Embed Badge

![Health badge](/badges/chatbox-tmp-data/health.svg)

```
[![Health](https://phpackages.com/badges/chatbox-tmp-data/health.svg)](https://phpackages.com/packages/chatbox-tmp-data)
```

###  Alternatives

[enniosousa/server-error-pages

Laravel server-side error pages

175.6k](/packages/enniosousa-server-error-pages)

PHPackages © 2026

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