Search by

kevinb1989 / likeable

Like an unlike Laravel eloquent models.

Maintainers

Package info

github.com/kevinb1989/likeable

pkg:composer/kevinb1989/likeable

Transparency log

Statistics

Installs: 6

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

0.2.1 2026-09-04 04:35 UTC

README

Likeable

Packagist PHP from Packagist Laravel versions GitHub Workflow Status (main) Total Downloads

Like an unlike Laravel eloquent models.

Installation

You can install the package via Composer:

composer require kevinb1989/likeable

You may publish all of the package's resources at once:

php artisan vendor:publish --tag="likeable"

Or, you may publish each resource individually:

Publishing and Running the Migrations

php artisan vendor:publish --tag="likeable-migrations"
php artisan migrate

Usage

// An Eloquent model is liked by the authenticated user.
$post->like();

// An Eloquent model is unliked by the authenticated user.
$post->unlike();

// Get all likes of an Eloquent model.
$post->likes();

// Check if the Eloquent model is liked by the authenticated user.
$post->liked;

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Thank you for considering contributing to Likeable! Please review our contributing guide to get started.

Credits

License

Likeable is open-sourced software licensed under the MIT license.