PHPackages                             laravel-interaction/clap - 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. laravel-interaction/clap

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

laravel-interaction/clap
========================

User clap/unclap behaviour for Laravel.

3.5.0(2mo ago)1488MITPHPPHP ^8.0CI failing

Since Apr 30Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/laravel-interaction/clap)[ Packagist](https://packagist.org/packages/laravel-interaction/clap)[ Docs](https://github.com/laravel-interaction/clap)[ RSS](/packages/laravel-interaction-clap/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)Dependencies (12)Versions (27)Used By (0)

Laravel Clap
============

[](#laravel-clap)

User clap/unclap behaviour for Laravel.

[![Latest Stable Version](https://camo.githubusercontent.com/6962295fb9c1cc993c68107fd73d4f86d3a37336df223102501e8d8d4041a16a/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2d696e746572616374696f6e2f636c61702f762f737461626c652e737667)](https://packagist.org/packages/laravel-interaction/clap)[![Total Downloads](https://camo.githubusercontent.com/31334b77eb1d64d9d1340f5a3f399fbde42d5953c534ea7184297aa8a934c5fd/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2d696e746572616374696f6e2f636c61702f646f776e6c6f616473)](https://packagist.org/packages/laravel-interaction/clap)[![Latest Unstable Version](https://camo.githubusercontent.com/152331f8244a407950b9ee29719f6e7e4fdacaacebfbfc0de6b148452ba93af9/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2d696e746572616374696f6e2f636c61702f762f756e737461626c652e737667)](https://packagist.org/packages/laravel-interaction/clap)[![License](https://camo.githubusercontent.com/b51baed17aacbdcd5122b62446f553fc6cea32ec953c8f13b567dc89c1795ba2/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2d696e746572616374696f6e2f636c61702f6c6963656e7365)](https://packagist.org/packages/laravel-interaction/clap)

Introduction
------------

[](#introduction)

It let people express how they feel about the model(documentation/subject/topic).

[![](https://camo.githubusercontent.com/700b5d0abe664a029a555df1e46e25b7f972efc72e5c16c483f6596221c2e8cb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2546302539462539312538462d312e326b2d677265656e3f7374796c653d736f6369616c)](https://camo.githubusercontent.com/700b5d0abe664a029a555df1e46e25b7f972efc72e5c16c483f6596221c2e8cb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2546302539462539312538462d312e326b2d677265656e3f7374796c653d736f6369616c)

Installation
------------

[](#installation)

### Requirements

[](#requirements)

- [PHP 8.0+](https://php.net/releases/)
- [Composer](https://getcomposer.org)
- [Laravel 8.0+](https://laravel.com/docs/releases)

### Instructions

[](#instructions)

Require Laravel Clap using [Composer](https://getcomposer.org).

```
composer require laravel-interaction/clap
```

Publish configuration and migrations

```
php artisan vendor:publish --tag=clap-config
php artisan vendor:publish --tag=clap-migrations
```

Run database migrations.

```
php artisan migrate
```

Usage
-----

[](#usage)

### Setup Clapper

[](#setup-clapper)

```
use Illuminate\Database\Eloquent\Model;
use LaravelInteraction\Clap\Concerns\Clapper;

class User extends Model
{
    use Clapper;
}
```

### Setup Ratable

[](#setup-ratable)

```
use Illuminate\Database\Eloquent\Model;
use LaravelInteraction\Clap\Concerns\Clappable;

class Channel extends Model
{
    use Clappable;
}
```

### Clapr

[](#clapr)

```
use LaravelInteraction\Clap\Tests\Models\Channel;
/** @var \LaravelInteraction\Clap\Tests\Models\User $user */
/** @var \LaravelInteraction\Clap\Tests\Models\Channel $channel */
// Clap to Ratable
$user->clap($channel);
// clap is only allowed to be called once
$user->clapOnce($channel);
$user->unclap($channel);

// Compare Ratable
$user->hasClapped($channel);
$user->hasNotClapped($channel);

// Get clapped info
$user->clapperApplause()->count();

// with type
$user->clapperApplause()->withType(Channel::class)->count();

// get clapped channels
Channel::query()->whereClappedBy($user)->get();

// get channels doesnt clapped by user
Channel::query()->whereNotClappedBy($user)->get();
```

### Ratable

[](#ratable)

```
use LaravelInteraction\Clap\Tests\Models\User;
use LaravelInteraction\Clap\Tests\Models\Channel;
/** @var \LaravelInteraction\Clap\Tests\Models\User $user */
/** @var \LaravelInteraction\Clap\Tests\Models\Channel $channel */
// Compare Clapper
$channel->isClappedBy($user);
$channel->isNotClappedBy($user);
// Get clappers info
$channel->clappers->each(function (User $user){
    echo $user->getKey();
});
$channel->loadClappersCount();
$channels = Channel::query()->withClappersCount()->get();
$channels->each(function (Channel $channel){
    echo $channel->clappers()->count(); // 1100
    echo $channel->clappers_count; // "1100"
    echo $channel->clappersCount(); // 1100
    echo $channel->clappersCountForHumans(); // "1.1K"
});
```

### Events

[](#events)

EventFired`LaravelInteraction\Clap\Events\Clapped`When an object get clapped.`LaravelInteraction\Clap\Events\Unclapped`When an object get unclapped.License
-------

[](#license)

Laravel Clap is an open-sourced software licensed under the [MIT license](LICENSE).

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance88

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 90.9% 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 ~71 days

Recently: every ~274 days

Total

26

Last Release

61d ago

Major Versions

0.6.0 → 1.0.0-alpha.12021-08-28

0.6.1 → 1.0.0-alpha.22021-08-31

1.x-dev → 2.0.0-beta.12022-03-10

2.x-dev → 3.0.02022-11-27

PHP version history (3 changes)0.4.0PHP ^7.2 || ^8.0

2.0.0-beta.1PHP ^7.3 || ^8.0

3.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/5fafa5bffa28dcd722432b244bf3f0bfe773406df29fea295847e2397b95d50b?d=identicon)[zingimmick](/maintainers/zingimmick)

---

Top Contributors

[![zingimmick](https://avatars.githubusercontent.com/u/26657141?v=4)](https://github.com/zingimmick "zingimmick (40 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

---

Tags

applauseclaplaravellaravelclapapplause

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/laravel-interaction-clap/health.svg)

```
[![Health](https://phpackages.com/badges/laravel-interaction-clap/health.svg)](https://phpackages.com/packages/laravel-interaction-clap)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[laracraft-tech/laravel-useful-additions

A collection of useful Laravel additions!

58109.4k](/packages/laracraft-tech-laravel-useful-additions)[laravel-interaction/bookmark

User bookmark/unbookmark behaviour for Laravel.

105.0k](/packages/laravel-interaction-bookmark)[glhd/special

1929.4k](/packages/glhd-special)[bjuppa/laravel-blog

Add blog functionality to your Laravel project

483.3k2](/packages/bjuppa-laravel-blog)

PHPackages © 2026

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