PHPackages                             afea/filament-testimonials - 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. afea/filament-testimonials

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

afea/filament-testimonials
==========================

Testimonials module for the Afea Filament CMS package ecosystem: customer quotes with optional photo and video testimonials.

v0.1.0(1mo ago)017↑328.6%MITPHPPHP ^8.4

Since Apr 21Pushed 1mo agoCompare

[ Source](https://github.com/AfeaSoftware/filament-testimonials)[ Packagist](https://packagist.org/packages/afea/filament-testimonials)[ RSS](/packages/afea-filament-testimonials/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (12)Versions (2)Used By (0)

afea/filament-testimonials
==========================

[](#afeafilament-testimonials)

Testimonials module for the Afea Filament CMS package ecosystem.

Ships:

- `Testimonial` model — photo + optional video via Spatie media collections
- Reorderable Filament v4 `TestimonialResource`
- `TestimonialsPlugin`
- `afea:install:testimonials` installer

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

[](#installation)

```
composer require afea/filament-testimonials
php artisan afea:install:testimonials
```

Register in `AdminPanelProvider`:

```
->plugin(\Afea\Cms\Testimonials\Filament\TestimonialsPlugin::make())
```

Three common scenarios
----------------------

[](#three-common-scenarios)

### 1. Render active testimonials on the home page

[](#1-render-active-testimonials-on-the-home-page)

```
use Afea\Cms\Testimonials\Models\Testimonial;

$quotes = Testimonial::query()->active()->ordered()->get();
```

### 2. Video testimonials only

[](#2-video-testimonials-only)

```
$videoQuotes = Testimonial::query()
    ->active()
    ->ordered()
    ->get()
    ->filter(fn (Testimonial $t) => $t->hasVideo());
```

### 3. Model override with a custom scope

[](#3-model-override-with-a-custom-scope)

```
class Testimonial extends \Afea\Cms\Testimonials\Models\Testimonial
{
    public function scopeFeatured($q)
    {
        return $q->active()->where('order', '
