PHPackages                             stevecreekmore/laravel-like - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. stevecreekmore/laravel-like

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

stevecreekmore/laravel-like
===========================

A User can like another User

v1.0.2(8mo ago)0237↓90.9%MITPHPPHP ^8.1

Since Oct 3Pushed 8mo agoCompare

[ Source](https://github.com/stevecreekmore/laravel-like)[ Packagist](https://packagist.org/packages/stevecreekmore/laravel-like)[ Docs](https://github.com/stevecreekmore/laravel-like)[ RSS](/packages/stevecreekmore-laravel-like/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Laravel Like
============

[](#laravel-like)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a5afa9bf1c12ed1b5beddf8c53f716bda9cc70e153ebce9dccb06bdbe44533d0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7374657665637265656b6d6f72652f6c61726176656c2d6c696b652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/stevecreekmore/laravel-like)[![Total Downloads](https://camo.githubusercontent.com/94618070baeee190fae39f82e0b3291e4310bc66226140b8cc414e4821a9976e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7374657665637265656b6d6f72652f6c61726176656c2d6c696b652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/stevecreekmore/laravel-like)

A simple Laravel package for liking and unliking users.

Requirements
------------

[](#requirements)

- Laravel 11 or greater.
- Laravel `User` model.

Installation
------------

[](#installation)

Via Composer

```
$ composer require stevecreekmore/laravel-like
```

Import LaravelLike into your User model and add the trait.

```
namespace App\Models;

use stevecreekmore\LaravelLike\LaravelLike;

class User extends Authenticatable
{
    use LaravelLike;
}
```

Then run migrations.

```
php artisan migrate

```

Usage
-----

[](#usage)

Like a user.

```
auth()->user()->like($user);
```

Unlike a user.

```
auth()->user()->unlike($user);
```

Check if a user is liking another user.

```
@if (auth()->user()->isLiking($user))
    You are liking this user.
@endif
```

Check if a user is liked by another user.

```
@if (auth()->user()->isLikedBy($user))
    This user is liking you.
@endif
```

Returns the users a user is liking.

```
auth()->user()->getLiking();
```

Returns the users who are liking a user.

```
auth()->user()->getLikers();
```

Returns an array of IDs of the users a user is liking.

```
auth()->user()->getLikingIds();
```

Returns an array of IDs of the users who are liking a user.

```
auth()->user()->getLikersIds();
```

Returns an array of IDs of the users a user is liking, and who is liking a user

```
auth()->user()->getLikingAndLikersIds()
```

Testing
-------

[](#testing)

```
$ composer test
```

License
-------

[](#license)

MIT. Please see the [license file](license.md) for more information.

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance58

Moderate activity, may be stable

Popularity14

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

266d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/afb173c89698b330f558b86206eccb9b82ceba31d762eaef7da62880f07c77e8?d=identicon)[Creekmore108](/maintainers/Creekmore108)

---

Top Contributors

[![stevecreekmore](https://avatars.githubusercontent.com/u/5994720?v=4)](https://github.com/stevecreekmore "stevecreekmore (6 commits)")

---

Tags

laravellaravel-likeLike users

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/stevecreekmore-laravel-like/health.svg)

```
[![Health](https://phpackages.com/badges/stevecreekmore-laravel-like/health.svg)](https://phpackages.com/packages/stevecreekmore-laravel-like)
```

###  Alternatives

[imdhemy/laravel-purchases

The top-notch Laravel receipt validator.

3871.2M3](/packages/imdhemy-laravel-purchases)[martbock/laravel-diceware

Diceware Passphrase Generator for Laravel

3268.9k](/packages/martbock-laravel-diceware)[orchestra/auth

Auth Component for Orchestra Platform

22108.6k3](/packages/orchestra-auth)[ingria/laravel-x509-auth

Laravel 5 Client Certificate auth middleware

375.6k](/packages/ingria-laravel-x509-auth)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
