PHPackages                             racashmoney/laravel-blockable - 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. [Database &amp; ORM](/categories/database)
4. /
5. racashmoney/laravel-blockable

ActiveLibrary[Database &amp; ORM](/categories/database)

racashmoney/laravel-blockable
=============================

Trait for Laravel Eloquent models to allow easy implementation of a 'block' or 'ignore' feature.

2.0.3(9y ago)4251MITPHPPHP &gt;=5.5.0

Since Sep 19Pushed 9y ago1 watchersCompare

[ Source](https://github.com/racashmoney/laravel-blockable)[ Packagist](https://packagist.org/packages/racashmoney/laravel-blockable)[ Docs](https://github.com/racashmoney/laravel-blockable)[ RSS](/packages/racashmoney-laravel-blockable/feed)WikiDiscussions laravel-5 Synced today

READMEChangelogDependencies (5)Versions (20)Used By (0)

Laravel Blockable Plugin
========================

[](#laravel-blockable-plugin)

[![Build Status](https://camo.githubusercontent.com/2fb16d13c072c5d02b4f869466e10a298d058c930e74664feaaae109ab76e7b0/68747470733a2f2f7472617669732d63692e6f72672f7274636f6e6e65722f6c61726176656c2d626c6f636b61626c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/rtconner/laravel-likeable)[![Latest Stable Version](https://camo.githubusercontent.com/3503b28d6ef2d170ba13ecf853979c01ef4251ea234547bcdbab65a7ea6da47a/68747470733a2f2f706f7365722e707567782e6f72672f7274636f6e6e65722f6c61726176656c2d626c6f636b61626c652f762f737461626c652e737667)](https://packagist.org/packages/rtconner/laravel-likeable)[![License](https://camo.githubusercontent.com/3d5b63cfb7990eccbaff020926db343b5525cd3f47bd5ef30f88f1983c494f05/68747470733a2f2f706f7365722e707567782e6f72672f7274636f6e6e65722f6c61726176656c2d626c6f636b61626c652f6c6963656e73652e737667)](https://packagist.org/packages/rtconner/laravel-likeable)

Trait for Laravel Eloquent models to allow easy implementation of a "block" or "ignore" feature.

[Laravel 5 Documentation](https://github.com/racashmoney/laravel-blockable/tree/laravel-5)

#### Composer Install (for Laravel 5)

[](#composer-install-for-laravel-5)

```
composer require racashmoney/laravel-blockable "~2.0"

```

#### Install and then run the migrations

[](#install-and-then-run-the-migrations)

```
'providers' => [
	\Racashmoney\Blockable\BlockableServiceProvider::class,
],
```

```
php artisan vendor:publish --provider="Racashmoney\Blockable\BlockableServiceProvider" --tag=migrations
php artisan migrate
```

#### Setup your models

[](#setup-your-models)

```
class Article extends \Illuminate\Database\Eloquent\Model {
	use \Racashmoney\Blockable\Blockable;
}
```

#### Sample Usage

[](#sample-usage)

```
$article->block(); // block the article for current user
$article->block($myUserId); // pass in your own user id
$article->block(0); // just add blocks to the count, and don't track by user

$article->unblock(); // remove block from the article
$article->unblock($myUserId); // pass in your own user id
$article->unblock(0); // remove blocks from the count -- does not check for user

$article->blockCount; // get count of blocks

$article->blocks; // Iterable Illuminate\Database\Eloquent\Collection of existing blocks

$article->blocked(); // check if currently logged in user blocked the article
$article->blocked($myUserId);

Article::whereBlockedBy($myUserId) // find only articles where user blocked them
	->with('blockCounter') // highly suggested to allow eager load
	->get();
```

#### Credits

[](#credits)

- Robert Conner -

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 83.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 ~41 days

Total

18

Last Release

3606d ago

Major Versions

0.1.2 → 1.0.02015-02-15

0.2.0 → 1.0.12015-02-16

1.2.1 → 2.0.02016-08-10

PHP version history (2 changes)0.1.0PHP &gt;=5.3.0

1.2.0PHP &gt;=5.5.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9951078?v=4)[Rakesh Saini](/maintainers/racashmoney)[@racashmoney](https://github.com/racashmoney)

---

Top Contributors

[![rtconner](https://avatars.githubusercontent.com/u/334533?v=4)](https://github.com/rtconner "rtconner (47 commits)")[![racashmoney](https://avatars.githubusercontent.com/u/9951078?v=4)](https://github.com/racashmoney "racashmoney (6 commits)")[![RomainSauvaire](https://avatars.githubusercontent.com/u/1195119?v=4)](https://github.com/RomainSauvaire "RomainSauvaire (2 commits)")[![liorocks](https://avatars.githubusercontent.com/u/534610?v=4)](https://github.com/liorocks "liorocks (1 commits)")

---

Tags

laraveleloquenttraitlaravel5blockignoreblockable

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/racashmoney-laravel-blockable/health.svg)

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

###  Alternatives

[kirschbaum-development/eloquent-power-joins

The Laravel magic applied to joins.

1.6k29.9M42](/packages/kirschbaum-development-eloquent-power-joins)[cybercog/laravel-ban

Laravel Ban simplify blocking and banning Eloquent models.

1.1k681.6k12](/packages/cybercog-laravel-ban)[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k322.4k1](/packages/cybercog-laravel-love)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[watson/validating

Eloquent model validating trait.

9733.4M53](/packages/watson-validating)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8723.1M23](/packages/yajra-laravel-oci8)

PHPackages © 2026

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