PHPackages                             rectitude-open/filament-site-snippets - 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. rectitude-open/filament-site-snippets

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

rectitude-open/filament-site-snippets
=====================================

A Filament plugin for easily managing content snippets like text, rich text, or images.

v1.6.0(1y ago)1490[4 PRs](https://github.com/rectitude-open/filament-site-snippets/pulls)1MITPHPPHP ^8.1CI passing

Since Jun 2Pushed 3mo agoCompare

[ Source](https://github.com/rectitude-open/filament-site-snippets)[ Packagist](https://packagist.org/packages/rectitude-open/filament-site-snippets)[ Docs](https://github.com/rectitude-open/filament-site-snippets)[ RSS](/packages/rectitude-open-filament-site-snippets/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (7)Dependencies (12)Versions (13)Used By (1)

[![Filament Site Snippets Banner](./art/Filament%20Site%20Snippets.png)](./art/Filament%20Site%20Snippets.png)

Filament Site Snippets
======================

[](#filament-site-snippets)

[![Tests](https://github.com/rectitude-open/filament-site-snippets/actions/workflows/run-tests.yml/badge.svg)](https://github.com/rectitude-open/filament-site-snippets/actions/workflows/run-tests.yml)[![PHPStan](https://camo.githubusercontent.com/2de44fa415e74513b3ab0978012f8b4bb8e37dafe58e2d27f779705b278f0373/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c253230352d627269676874677265656e)](https://phpstan.org/)[![Latest Version on Packagist](https://camo.githubusercontent.com/76c1e140338493f27c8e590cd6dea88fffecdd6b58c47465176037efba26514b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7265637469747564652d6f70656e2f66696c616d656e742d736974652d736e6970706574732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rectitude-open/filament-site-snippets)[![Total Downloads](https://camo.githubusercontent.com/9de21d0b129eb71805662728d1100ac4e9c745536e06fa304857cea1edc87d3b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7265637469747564652d6f70656e2f66696c616d656e742d736974652d736e6970706574732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rectitude-open/filament-site-snippets)[![PRs Welcome](https://camo.githubusercontent.com/25b3e6d0d42c98de74a98cbb4d149a1c09020cf6d1361993b72d7d5b8ffed363/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5052732d77656c636f6d652d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/rectitude-open/filament-site-snippets/pulls)

This Filament plugin provides a simple way to manage "snippets" – small, reusable pieces of content like text, rich text, or images – directly from your Filament admin panel. These snippets can be easily integrated into various parts of your website, such as footer copyright notices, site taglines, or other dynamic content elements that you want to manage centrally.

This package is also a standalone part of a CMS project: [FilaPress](https://github.com/rectitude-open/filapress).

ResourcePageClusterMigrationModelConfigViewLocalization✅❌❌✅✅✅❌✅Installation
------------

[](#installation)

You can install the package via composer:

```
composer require rectitude-open/filament-site-snippets
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="filament-site-snippets-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --tag="filament-site-snippets-config"
```

Optionally, you can publish the translations using

```
php artisan vendor:publish --tag="filament-site-snippets-translations"
```

This is the contents of the published config file:

```
return [
    'filament_resource' => RectitudeOpen\FilamentSiteSnippets\Resources\SiteSnippetResource::class,
    'model' => RectitudeOpen\FilamentSiteSnippets\Models\SiteSnippet::class,
    'navigation_sort' => 0,
    'navigation_icon' => 'heroicon-o-puzzle-piece',
    'editor_component_class' => \Filament\Forms\Components\RichEditor::class,
];
```

Usage
-----

[](#usage)

The package provides a resource page that allows you to view snippets in your Filament admin panel.

To use the resource page provided by this package, you need to register it in your Panel Provider first.

```
namespace App\Providers\Filament;

use RectitudeOpen\FilamentSiteSnippets\FilamentSiteSnippetsPlugin;

class AdminPanelProvider extends PanelProvider
{
    public function panel(Panel $panel): Panel
    {
        return $panel
            ->plugins([
                FilamentSiteSnippetsPlugin::make()
            ]);
    }
}
```

### Retrieving Snippets in Your Application

[](#retrieving-snippets-in-your-application)

This package also provides a helper class `RectitudeOpen\FilamentSiteSnippets\FilamentSiteSnippets` to easily retrieve snippet values in your application code (e.g., in your Blade views, controllers, or services).

Here are some common ways to use it:

```
use RectitudeOpen\FilamentSiteSnippets\FilamentSiteSnippets;

$copyright = FilamentSiteSnippets::get('footer_copyright');
$allSnippets = FilamentSiteSnippets::all();
if(FilamentSiteSnippets::exists('promo_banner_text')) { ... }
```

### Cache Management

[](#cache-management)

Snippets are cached by default to improve performance. You can clear the cache for a specific snippet or all snippets:

```
// Clear cache for a specific snippet
FilamentSiteSnippets::clearCache('footer_copyright');

// Clear cache for all snippets
FilamentSiteSnippets::clearCache();
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Aspirant Zhang](https://github.com/aspirantzhang)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance67

Regular maintenance activity

Popularity14

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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 ~11 days

Recently: every ~17 days

Total

7

Last Release

366d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/06e113a1e04f4cde069f333882f90653a22ce080afa4ac21d1c3d95533b074d5?d=identicon)[aspirantzhang](/maintainers/aspirantzhang)

---

Top Contributors

[![aspirantzhang](https://avatars.githubusercontent.com/u/24559988?v=4)](https://github.com/aspirantzhang "aspirantzhang (18 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (8 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

filament-pluginlaravelsnippetslaravelsnippetsfilament-plugin

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/rectitude-open-filament-site-snippets/health.svg)

```
[![Health](https://phpackages.com/badges/rectitude-open-filament-site-snippets/health.svg)](https://phpackages.com/packages/rectitude-open-filament-site-snippets)
```

###  Alternatives

[backstage/mails

View logged mails and events in a beautiful Filament UI.

16429.7k](/packages/backstage-mails)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3915.5k](/packages/rawilk-profile-filament-plugin)[stephenjude/filament-feature-flags

Filament implementation of feature flags and segmentation with Laravel Pennant.

123204.9k1](/packages/stephenjude-filament-feature-flags)[marcelweidum/filament-expiration-notice

Customize the livewire expiration notice

94160.6k6](/packages/marcelweidum-filament-expiration-notice)[stephenjude/filament-two-factor-authentication

Filament Two Factor Authentication: Google 2FA + Passkey Authentication

85240.3k9](/packages/stephenjude-filament-two-factor-authentication)[marcelweidum/filament-passkeys

Use passkeys in your filamentphp app

6758.2k2](/packages/marcelweidum-filament-passkeys)

PHPackages © 2026

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