PHPackages                             alibayat/likeable - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. alibayat/likeable

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

alibayat/likeable
=================

Implementing a Like system for Laravel's Eloquent models.

293402PHP

Since Sep 26Pushed 5y ago2 watchersCompare

[ Source](https://github.com/AliBayat/Laravel-Likeable)[ Packagist](https://packagist.org/packages/alibayat/likeable)[ RSS](/packages/alibayat-likeable/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Likeable Package
========================

[](#laravel-likeable-package)

This Package is for Laravel 5+ and makes it easy to implement Liking/Favoriting system for Eloquent's Models. just use the trait in the model and you're good to go.

#### Composer Install (for Laravel 5+)

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

```
composer require alibayat/likeable

```

#### Publish and Run the migrations

[](#publish-and-run-the-migrations)

```
php artisan vendor:publish --provider="AliBayat\LaravelLikeable\LikeableServiceProvider" --tag=migrations

php artisan migrate
```

if you're using Laravel version 5.5+, Likeable package will be auto-discovered by Laravel. and if not: register the package in config/app.php providers array manually.

```
'providers' => [
	...
	\AliBayat\LaravelLikeable\LikeableServiceProvider::class,
],
```

#### Setup models - just use the Trait in the Model.

[](#setup-models---just-use-the-trait-in-the-model)

```
