定制 cwsps154/my-gallery 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

cwsps154/my-gallery

最新稳定版本:v1.0.0

Composer 安装命令:

composer require cwsps154/my-gallery

包简介

Filament package for gallery

README 文档

README

Filament package for gallery

Installation

Install Using Composer

composer require cwsps154/my-gallery

Run

php artisan my-gallery:install
php artisan filament:assets

Usage/Examples

Add this into your Filament PannelProvider class panel()

use CWSPS154\UsersRolesPermissions\MyGalleryPlugin;

$panel->plugins([MyGalleryPlugin::make()]);

You can limit the access to the resources

use CWSPS154\UsersRolesPermissions\MyGalleryPlugin;

MyGalleryPlugin::make()
    ->canViewAny(function () {
        return true;
    })
    ->canCreate(function () {
        return true;
    })
    ->canEdit(function () {
        return true;
    })
    ->canDelete(function () {
        return true;
    })

If you are using cwsps154/users-roles-permissions plugin you can use like this

use CWSPS154\MyGallery\Models\Gallery;
use CWSPS154\UsersRolesPermissions\MyGalleryPlugin;
use CWSPS154\UsersRolesPermissions\UsersRolesPermissionsServiceProvider;

MyGalleryPlugin::make()
    ->canViewAny(UsersRolesPermissionsServiceProvider::HAVE_ACCESS_GATE, Gallery::VIEW_GALLERY)
    ->canCreate(UsersRolesPermissionsServiceProvider::HAVE_ACCESS_GATE, Gallery::CREATE_GALLERY)
    ->canEdit(UsersRolesPermissionsServiceProvider::HAVE_ACCESS_GATE, Gallery::EDIT_GALLERY)
    ->canDelete(UsersRolesPermissionsServiceProvider::HAVE_ACCESS_GATE, Gallery::DELETE_GALLERY),

You can publish the config file my-gallery.php, by running this command

php artisan vendor:publish --tag=my-gallery-config

which contains these settings

return [
    'settings-page' => \CWSPS154\AppSettings\Page\AppSettings::class,
];

You have to run queue in your local to see the saved gallery

php artisan queue:work

Set the cron in server for the same

Screenshots

MyGallery

MyGallery

MyGallery

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-03-15