kevinb1989 / likeable
Like an unlike Laravel eloquent models.
0.2.1
2026-09-04 04:35 UTC
Requires
- php: ^8.3
- illuminate/support: ^12.0||^13.0
Requires (Dev)
- larastan/larastan: ^3.9
- laravel/pao: ^1.0
- laravel/pint: ^1.29
- orchestra/testbench: ^10.0||^11.0
- pestphp/pest: ^4.6||^5.0
- pestphp/pest-plugin-laravel: ^4.1||^5.0
- pestphp/pest-plugin-type-coverage: ^4.0||^5.0
- phpstan/extension-installer: ^1.4
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-04 04:37:47 UTC
README
Likeable
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.