PHPackages                             huement/statamic-ytlistr - 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. [Database &amp; ORM](/categories/database)
4. /
5. huement/statamic-ytlistr

ActiveStatamic-addon[Database &amp; ORM](/categories/database)

huement/statamic-ytlistr
========================

Statamic addon for syncing YouTube videos to a local database

v1.2.0(1mo ago)0100MITPHPPHP ^8.1

Since Dec 4Pushed 1mo agoCompare

[ Source](https://github.com/huement/statamic-ytlistr)[ Packagist](https://packagist.org/packages/huement/statamic-ytlistr)[ RSS](/packages/huement-statamic-ytlistr/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (2)Dependencies (6)Versions (10)Used By (0)

Statamic YouTube Listr
======================

[](#statamic-youtube-listr)

A Statamic addon that syncs YouTube videos from a channel to your local database and provides Antlers tags to display them.

[![Control Panel Interface](preview.png)](preview.png)*Manage your YouTube videos directly from the Statamic Control Panel*

Features
--------

[](#features)

- 🎥 Sync YouTube videos from any channel
- 📊 View video stats (views, likes, duration)
- 🏷️ Easy-to-use Antlers tags for frontend display
- 🔄 Manual or automated syncing
- 💾 Local database storage for fast access
- 🎨 Clean Control Panel interface

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

[](#installation)

You can install the package via Composer:

```
composer require huement/statamic-ytlistr
```

The package will automatically register itself with Statamic.

### Requirements

[](#requirements)

- PHP ^8.1
- Statamic CMS ^5.0 || ^6.0

Configuration
-------------

[](#configuration)

Add these variables to your `.env` file:

```
YOUTUBE_API_KEY=your_youtube_api_key
YOUTUBE_CHANNEL_ID=your_youtube_channel_id
YOUTUBE_MAX_RESULTS=50
```

Usage
-----

[](#usage)

### Sync Videos

[](#sync-videos)

Via Control Panel:

- Navigate to Tools &gt; YouTube Listr
- Click "Sync Videos from YouTube"

Via Command Line:

```
php artisan ytlistr:fetch
php artisan ytlistr:fetch --limit=100
```

Template Usage
--------------

[](#template-usage)

Statamic YouTube Listr is entirely template-engine and storage-driver agnostic. Whether your frontend is powered by **Antlers** or **Blade**, and whether your backend uses the **Database** or **Flat-File (YAML)** driver, your data maps will render perfectly.

### 1. Antlers Templates

[](#1-antlers-templates)

[![Frontend Display Example](preview-frontend.png)](preview-frontend.png)*Display your YouTube videos beautifully on the frontend*

List and filter recent videos:

```
{{ yt_listr limit="5" }}
    {{ title }}

    {{ duration_formatted }} | {{ view_count }} views
    Watch on YouTube
{{ /yt_listr }}
```

#### Get the Single Latest Video

[](#get-the-single-latest-video)

```
{{ yt_listr:latest }}
    {{ title }}

{{ /yt_listr:latest }}
```

#### Get total video count:

[](#get-total-video-count)

```
Total videos: {{ yt_listr:count }}
```

### 2. Laravel Blade Templates

[](#2-laravel-blade-templates)

If you are building your frontend templates using standard Laravel Blade, you have two ways to fetch and loop through your video entries safely.

Approach A: Statamic Blade Components (Cleanest) Statamic registers an engine-level &lt;s:tag&gt; layout scheme that perfectly mirrors standard Antlers markup. It hooks up scopes and isolates variables automatically:

```

    {{ $title }}
    {{ $duration_formatted }}

```

#### Approach B: Direct Service Container Binding

[](#approach-b-direct-service-container-binding)

If you prefer extracting data arrays straight into traditional Blade inline variables, resolve the contract binding from the container.

**Crucial Optimization**: **ALWAYS** route parameters through Laravel's native `data_get()` wrapper. This guarantees that your loop evaluates keys correctly whether the active driver outputs a typed Database Eloquent Model Object or a raw flat-file YAML Data Array. If you dont do this, it will break your loops.

```
@php
    // Dynamically resolves DatabaseVideoRepository or YamlVideoRepository based on config
    $repo = app(\Huement\StatamicYtListr\Repositories\VideoRepository::class);
    $videos = $repo->recent(6); // Fetch the 6 most recent tracking records
@endphp

@foreach ($videos as $video)

        {{ data_get($video, 'title') }}

            Duration: {{ gmdate('i:s', (int) data_get($video, 'duration', 0)) }}
            Views: {{ number_format((int) data_get($video, 'view_count', 0)) }}

@endforeach
```

Available Data
--------------

[](#available-data)

Each video provides:

- `id` - Database ID
- `video_id` - YouTube video ID
- `title` - Video title
- `description` - Video description
- `thumbnail_url` - Thumbnail image URL
- `published_at` - Publication date
- `duration` - Duration in seconds
- `duration_formatted` - Human-readable duration (MM:SS)
- `view_count` - Number of views
- `like_count` - Number of likes
- `comment_count` - Number of comments
- `channel_id` - YouTube channel ID
- `channel_title` - Channel name
- `youtube_url` - Full YouTube URL
- `embed_url` - YouTube embed URL

Credits
-------

[](#credits)

Created and sponsored by [Huement.com](https://huement.com) - A software studio creating awesome content and exceptional web experiences.

Links
-----

[](#links)

- [GitHub Repository](https://github.com/huement/statamic-ytlistr)
- [Packagist](https://packagist.org/packages/huement/statamic-ytlistr)
- [Huement.com Demo](https://huement.com/blog)

#### Have you seen my comments plugin?

[](#have-you-seen-my-comments-plugin)

I have a new Statamic 6+ Comments Plugin, called `StatComm`. It's pretty great! Check it out!

- [StatComm Packagist](https://packagist.org/packages/huement/statcomm)
- [StatComm GitHub Repository](https://github.com/huement/statcomm)

### License &amp; Sponsorship

[](#license--sponsorship)

Distributed freely under the open-source **MIT License**. Maintained, optimized, and engineered / sponsored by **[HUEMENT](https://huement.com/)**.

 **If this software saved you time or a headache, consider keeping the engine running!**

 [ ![Buy Me a Coffee at ko-fi.com](https://camo.githubusercontent.com/98e68a8a848c0aff42ae688c194b8826ec9b5a8480d9bfbd2caaee987ab3aa7f/68747470733a2f2f73746f726167652e6b6f2d66692e636f6d2f63646e2f6b6f6669362e706e673f763d36) ](https://ko-fi.com/U1A7222617)

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance92

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.9% 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 ~27 days

Recently: every ~4 days

Total

9

Last Release

38d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3952d80c290d2bf2fe2308165a80d7ef4d36477490f184cca3370680335d8729?d=identicon)[johnnyfortune](/maintainers/johnnyfortune)

---

Top Contributors

[![johnny13](https://avatars.githubusercontent.com/u/598517?v=4)](https://github.com/johnny13 "johnny13 (10 commits)")[![huement](https://avatars.githubusercontent.com/u/40760855?v=4)](https://github.com/huement "huement (1 commits)")

---

Tags

laravelstatamicstatamic-addonyoutube-api

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/huement-statamic-ytlistr/health.svg)

```
[![Health](https://phpackages.com/badges/huement-statamic-ytlistr/health.svg)](https://phpackages.com/packages/huement-statamic-ytlistr)
```

###  Alternatives

[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

137236.2k8](/packages/statamic-rad-pack-runway)[statamic/eloquent-driver

Allows you to store Statamic data in a database.

128790.9k21](/packages/statamic-eloquent-driver)[statamic/seo-pro

71548.3k](/packages/statamic-seo-pro)[statamic/statamic

Statamic

832182.1k](/packages/statamic-statamic)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3622.8k](/packages/duncanmcclean-statamic-cargo)[rias/statamic-redirect

29347.4k](/packages/rias-statamic-redirect)

PHPackages © 2026

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