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

ActiveCraft-plugin[Utility &amp; Helpers](/categories/utility)

dukt/like
=========

Like plugin for Craft CMS

1.0.1(8y ago)44208[1 issues](https://github.com/dukt/like/issues)[2 PRs](https://github.com/dukt/like/pulls)PHP

Since Jun 3Pushed 4y ago3 watchersCompare

[ Source](https://github.com/dukt/like)[ Packagist](https://packagist.org/packages/dukt/like)[ RSS](/packages/dukt-like/feed)WikiDiscussions v1 Synced 2w ago

READMEChangelog (5)Dependencies (1)Versions (3)Used By (0)

Like for Craft CMS
==================

[](#like-for-craft-cms)

A simple plugin to connect to Like's API.

---

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

[](#installation)

1. Download the latest release of the plugin
2. Drop the `like` plugin folder to `craft/plugins`
3. Install Like from the control panel in `Settings > Plugins`

Templating
----------

[](#templating)

### Like button

[](#like-button)

```
{% if currentUser %}
    {% if craft.like.isLike(element.id) %}
         Unlike
    {% else %}
         Like
    {% endif %}
{% else %}
    Like
{% endif %}

```

### List likes for an element

[](#list-likes-for-an-element)

```
{% set likes = craft.like.getLikes(element.id) %}

{% if likes|length > 0 %}

    {% for like in likes %}

            {% if like.user.photoUrl %}

            {% else %}

            {% endif %}

    {% endfor %}

{% endif %}

```

### Your Likes

[](#your-likes)

Entries and asset that you like.

Entries:

```
{% set entries = craft.like.getUserLikes('Entry') %}

{% if entries %}

        {% for entry in entries %}
            {{entry.title}}
        {% endfor %}

{% else %}
    You haven't liked any entry yet.
{% endif %}

```

Assets:

```
{% set assets = craft.like.getUserLikes('Asset') %}

{% if assets %}

        {% for asset in assets %}

        {% endfor %}

{% else %}
    You haven't liked any asset yet.
{% endif %}

```

API
---

[](#api)

### LikeVariable

[](#likevariable)

- isLike($elementId)
- getLikes($elementId = null)
- getUserLikes($elementType = null, $userId = null)

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 97.6% 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

Every ~241 days

Total

3

Last Release

3197d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2911900?v=4)[Benjamin David](/maintainers/benjamindavid)[@benjamindavid](https://github.com/benjamindavid)

---

Top Contributors

[![benjamindavid](https://avatars.githubusercontent.com/u/2911900?v=4)](https://github.com/benjamindavid "benjamindavid (81 commits)")[![carlcs](https://avatars.githubusercontent.com/u/7516543?v=4)](https://github.com/carlcs "carlcs (2 commits)")

---

Tags

craft-plugincraft2craftcmslike

### Embed Badge

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

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

###  Alternatives

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.3k10](/packages/helsingborg-stad-municipio)[mautic/core

Mautic Open Source Distribution

9.8k2.6k9](/packages/mautic-core)[mediawiki/maps

Adds various mapping features to MediaWiki

84152.3k3](/packages/mediawiki-maps)[rainlab/blog-plugin

Blog plugin for October CMS

17158.6k](/packages/rainlab-blog-plugin)[civicrm/civicrm-drupal-8

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

19246.3k2](/packages/civicrm-civicrm-drupal-8)[starcitizentools/citizen-skin

A beautiful, usable, responsive MediaWiki skin with in-depth extension support. Originally developed for the Star Citizen Wiki.

3355.8k](/packages/starcitizentools-citizen-skin)

PHPackages © 2026

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