2017 © Pedro Peláez
 

library laravel-blockable

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

image

racashmoney/laravel-blockable

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

  • Tuesday, August 16, 2016
  • by racashmoney
  • Repository
  • 1 Watchers
  • 2 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 32 Forks
  • 0 Open issues
  • 20 Versions
  • 0 % Grown

The README.md

Laravel Blockable Plugin

Build Status Latest Stable Version License, (*1)

Trait for Laravel Eloquent models to allow easy implementation of a "block" or "ignore" feature., (*2)

Laravel 5 Documentation, (*3)

Composer Install (for Laravel 5)

composer require racashmoney/laravel-blockable "~2.0"

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

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

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

  • Robert Conner - http://smartersoftware.net

The Versions

16/08 2016

dev-laravel-5

dev-laravel-5 https://github.com/racashmoney/laravel-blockable

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

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel eloquent trait block laravel5 ignore blockable

16/08 2016

2.0.3

2.0.3.0 https://github.com/racashmoney/laravel-blockable

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

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel eloquent trait block laravel5 ignore blockable

16/08 2016

2.0.2

2.0.2.0 https://github.com/racashmoney/laravel-blockable

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

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel eloquent trait block laravel5 ignore blockable

11/08 2016

2.0.1

2.0.1.0 https://github.com/racashmoney/laravel-blockable

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

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel eloquent trait block laravel5 ignore blockable

10/08 2016

2.0.0

2.0.0.0 https://github.com/racashmoney/laravel-blockable

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

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel eloquent trait block laravel5 ignore blockable

15/02 2016

1.2.1

1.2.1.0 https://smartersoftware.net/packages/laravel-likeable-favorite

Trait for Laravel Eloquent models to allow easy implementation of a 'like' or 'favorite' or 'remember' feature.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel eloquent trait remember like follow favorite likeable likable favourite

07/02 2016

1.2.0

1.2.0.0 https://smartersoftware.net/packages/laravel-likeable-favorite

Trait for Laravel Eloquent models to allow easy implementation of a 'like' or 'favorite' or 'remember' feature.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel eloquent trait remember like follow favorite likeable likable favourite

18/01 2016

1.1.0

1.1.0.0 https://smartersoftware.net/packages/laravel-likeable-favorite

Trait for Laravel Eloquent models to allow easy implementation of a 'like' or 'favorite' or 'remember' feature.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel eloquent trait remember like follow favorite likeable likable favourite

09/11 2015

1.0.8

1.0.8.0 https://smartersoftware.net/packages/laravel-likeable-favorite

Trait for Laravel Eloquent models to allow easy implementation of a 'like' or 'favorite' or 'remember' feature.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel eloquent trait remember like follow favorite likeable likable favourite

30/05 2015

1.0.7

1.0.7.0 https://smartersoftware.net/packages/laravel-likeable-favorite

Trait for Laravel Eloquent models to allow easy implementation of a 'like' or 'favorite' or 'remember' feature.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel eloquent trait remember like follow favorite likeable likable favourite

28/05 2015

1.0.4

1.0.4.0 https://smartersoftware.net/packages/laravel-likeable-favorite

Trait for Laravel Eloquent models to allow easy implementation of a 'like' or 'favorite' or 'remember' feature.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel eloquent trait remember like follow favorite likeable likable favourite

08/05 2015

1.0.3

1.0.3.0 https://smartersoftware.net/packages/laravel-likeable-favorite

Trait for Laravel Eloquent models to allow easy implementation of a 'like' or 'favorite' or 'remember' feature.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel eloquent trait remember like follow favorite likeable likable favourite

07/05 2015

1.0.2

1.0.2.0 https://smartersoftware.net/packages/laravel-likeable-favorite

Trait for Laravel Eloquent models to allow easy implementation of a 'like' or 'favorite' or 'remember' feature.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel eloquent trait remember like follow favorite likeable likable favourite

17/02 2015

1.0.1

1.0.1.0 https://smartersoftware.net/packages/laravel-likeable-favorite

Trait for Laravel Eloquent models to allow easy implementation of a 'like' or 'favorite' or 'remember' feature.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel eloquent trait remember like follow favorite likeable likable favourite

15/02 2015

dev-laravel-4

dev-laravel-4 https://smartersoftware.net/packages/laravel-likeable-favorite

Trait for Laravel Eloquent models to allow easy implementation of a 'like' or 'favorite' or 'remember' feature.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel eloquent trait remember like follow favorite likeable likable favourite

15/02 2015

0.2.0

0.2.0.0 https://smartersoftware.net/packages/laravel-likeable-favorite

Trait for Laravel Eloquent models to allow easy implementation of a 'like' or 'favorite' or 'remember' feature.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel eloquent trait remember like follow favorite likeable likable favourite

15/02 2015

1.0.0

1.0.0.0 https://smartersoftware.net/packages/laravel-likeable-favorite

Trait for Laravel Eloquent models to allow easy implementation of a 'like' or 'favorite' or 'remember' feature.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel eloquent trait remember like follow favorite likeable likable favourite

20/09 2014

0.1.2

0.1.2.0 https://smartersoftware.net/packages/laravel-likeable-favorite

Trait for Laravel Eloquent models to allow easy implementation of a 'like' or 'favorite' or 'remember' feature.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel eloquent trait remember like follow favorite likeable likable favourite

19/09 2014

0.1.1

0.1.1.0 https://smartersoftware.net/packages/laravel-likeable-favorite

Trait for Laravel Eloquent models to allow easy implementation of a 'like' or 'favorite' or 'remember' feature.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel eloquent trait remember like follow favorite likeable likable favourite

19/09 2014

0.1.0

0.1.0.0 https://smartersoftware.net/packages/laravel-likeable-favorite

Trait for Laravel Eloquent models to allow easy implementation of a 'like' or 'favorite' or 'remember' feature.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel eloquent trait remember like follow favorite likeable likable favourite