aabosham/laravel-like

Create like for any models for laravel framework

Downloads

8

Stars

0

Version

Likeable

Likeable is a package for Laravel.

Installation

From the command line, run:

composer require aabosham/laravel-like
php artisan migrate
<?php

namespace App;

use Aabosham\Likeable\Likeable;

class Post extends Model
{
    use Likeable;

    ...
}
$model->isLikedBy();


$model->liked();

$model->likedsCount();

Scoping

$models = Model::likedBy(User $user)->get();
AAbosham

Author

AAbosham