PHPackages                             alive2212/laravel-smart-meta - 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. [Caching](/categories/caching)
4. /
5. alive2212/laravel-smart-meta

ActiveLibrary[Caching](/categories/caching)

alive2212/laravel-smart-meta
============================

this is meta data for any model that working with cache

v1.0.1(8y ago)217MITPHPPHP ~5.6|~7.0

Since May 9Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Alive2212/LaravelSmartMeta)[ Packagist](https://packagist.org/packages/alive2212/laravel-smart-meta)[ Docs](https://github.com/Alive2212/LaravelSmartMeta)[ RSS](/packages/alive2212-laravel-smart-meta/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (9)Versions (3)Used By (0)

LaravelSmartMeta
================

[](#laravelsmartmeta)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e68970b3701dfe0df30a2a019d4c415b8bcc17b3d7b15b58da2f31be5037bf4a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c697665323231322f6c61726176656c2d736d6172742d6d6574612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/Alive2212/laravel-smart-meta)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/8571f67b7d56f7ebf849eded6e57f1ed4a87ca96a616750aae7c2fd658443a87/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f416c697665323231322f4c61726176656c536d6172744d6574612f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/Alive2212/LaravelSmartMeta)[![Coverage Status](https://camo.githubusercontent.com/57d36d339506257e2afeaa25055177a52b7640c93e1f4aeba962444dfafc2dc3/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f416c697665323231322f4c61726176656c536d6172744d6574612e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/Alive2212/LaravelSmartMeta/code-structure)[![Quality Score](https://camo.githubusercontent.com/165f48bea905509620eb78269840ff233162763194a64855c254a43f711f37d5/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f416c697665323231322f4c61726176656c536d6172744d6574612e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/Alive2212/LaravelSmartMeta)[![Total Downloads](https://camo.githubusercontent.com/5c98b213c07f5af160b44cab968be072765ffd352a074d13495ae132ef861582/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c697665323231322f6c61726176656c2d736d6172742d6d6574612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/Alive2212/laravel-smart-meta)

This is Smart Meta for any model to assign expirable date to each of records.

Structure
---------

[](#structure)

If any of the following are applicable to your project, then the directory structure should follow industry best practices by being named the following.

```
src/
tests/

```

Install
-------

[](#install)

Via Composer

```
$ composer require alive2212/laravel-smart-meta
```

Usage
-----

[](#usage)

1- add trait to model

```
class User extends BaseAuthModel
{
    use SmartMeta;
}
```

2- to set meta to any model, should be done just following

```
$user = (new User())->find(1);
$user->putCacheMeta("1","I'm Strong man");
```

3- Another methods to set metas are:

```
// 1
$user->addCacheMeta("1","I'm String man");

// 2
$user->pushCacheMeta(["1","I'm String man"]);
```

4- Get metas methods are:

```
// 1 get all metas
$metaParams = $user->getCacheMetas();

// 2 get one of meta by key
$metaParams = $user->getCacheMeta("key","default");
```

5- Delete

```
// To delete all data
$user->deleteCacheMetas();

// TO delete one record
$user->deleteCacheMeta("key");
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Babak Nodoust](https://github.com/https://github.com/Alive2212)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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 ~2 days

Total

2

Last Release

2973d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/096cb0a90e1515fd7369bc03f9c36ce1cd55b64c3ac777400ea3997c28de83cc?d=identicon)[Alive2212](/maintainers/Alive2212)

---

Top Contributors

[![Alive2212](https://avatars.githubusercontent.com/u/5178290?v=4)](https://github.com/Alive2212 "Alive2212 (6 commits)")

---

Tags

Alive2212LaravelSmartMeta

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/alive2212-laravel-smart-meta/health.svg)

```
[![Health](https://phpackages.com/badges/alive2212-laravel-smart-meta/health.svg)](https://phpackages.com/packages/alive2212-laravel-smart-meta)
```

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.4M93](/packages/mongodb-laravel-mongodb)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M129](/packages/laravel-pulse)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k9.0M66](/packages/spatie-laravel-responsecache)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M125](/packages/roots-acorn)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k55.1k1](/packages/mike-bronner-laravel-model-caching)

PHPackages © 2026

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