承接 binarybuilds/filament-cache-manager 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

binarybuilds/filament-cache-manager

最新稳定版本:v1.0.0

Composer 安装命令:

composer require binarybuilds/filament-cache-manager

包简介

Filament Cache Manager is a FilamentPHP plugin that allows you to easily clear your Laravel application cache directly from the Filament admin panel.

README 文档

README

Filament Cache Manager is a FilamentPHP plugin that allows you to easily clear your Laravel application cache directly from the Filament admin panel.

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Filament cache manager

📦 Installation

Install via Composer:

composer require binarybuilds/filament-cache-manager

Register the plugin in your panel service provider:

use BinaryBuilds\FilamentCacheManager\FilamentCacheManagerPlugin;

$panel->plugin(FilamentCacheManagerPlugin::make());

🔐 Access Control

Restrict who can access the plugin:

FilamentCacheManagerPlugin::make()
    ->canAccessPlugin(fn () => Auth::user()->role === 'Admin');

Restrict who can use the Forget Key action:

FilamentCacheManagerPlugin::make()
    ->canForgetKey(fn () => Auth::user()->role === 'Admin');

Restrict who can use the Flush Cache action:

FilamentCacheManagerPlugin::make()
    ->canFlushCache(fn () => false);

⚙️ Customization

Change navigation label:

FilamentCacheManagerPlugin::make()
    ->navigationLabel('Cache');

Change navigation icon:

use Filament\Support\Icons\Heroiconl;

FilamentCacheManagerPlugin::make()
    ->navigationIcon(Heroicon::CpuChip);

Change navigation group:

FilamentCacheManagerPlugin::make()
    ->navigationGroup('Settings');

🧩 Predefined Cache Keys

Display common cache keys as cards with title, description, and optional status color:

FilamentCacheManagerPlugin::make()
    ->addCacheKey(
        'homepage',
        'Homepage Cache',
        'Clear this cache if the content on the homepage is out of date.'
    )
    ->addCacheKey(
        'layout',
        'Layout Cache',
        'Clear this cache if you recently made changes to menu items. Beware! this might cause a temporary slowness to the application.',
        'danger'
    )
    ->addCacheKey(
        'settings',
        'Settings Cache',
        'Clear this cache if you recently updated site settings'
    )
    ->addCacheKey(
        'articles',
        'Articles Cache',
        'Clear this cache if you added or updated articles and your changes are not reflecting on the site.'
    );

🧱 Card Layout Columns

Control the number of columns used to display the predefined cache key cards:

FilamentCacheManagerPlugin::make()
    ->columns(3);

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 876
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-10-13