tomatophp/filament-bookmarks-menu 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

tomatophp/filament-bookmarks-menu

最新稳定版本:v1.0.3

Composer 安装命令:

composer require tomatophp/filament-bookmarks-menu

包简介

Add bookmarks and tags to your resources records and access theme form your sidebar

README 文档

README

Screenshot

Filament Bookmarks Menu

Latest Stable Version License Downloads

Add bookmarks and tags to your resources records and access theme form your sidebar

Screenshots

Bookmark Menu Create Modal Add Bookmark Remove Bookmark Bookmark Page Bookmark Actions Bookmark Edit Bookmark Bulk Actions

Installation

composer require tomatophp/filament-bookmarks-menu

after install your package please run this command

php artisan filament-bookmarks-menu:install

finally register the plugin on /app/Providers/Filament/AdminPanelProvider.php

->plugin(\TomatoPHP\FilamentBookmarksMenu\FilamentBookmarksMenuPlugin::make())

Usage

you can add bookmark action to your page like this

use TomatoPHP\FilamentBookmarksMenu\Filament\Actions\BookmarkAction;

protected function getHeaderActions(): array
{
    return [
        BookmarkAction::make()
    ];
}

or to your table like this

use TomatoPHP\FilamentBookmarksMenu\Filament\Tables\BookmarkAction;

public function table(Table $table): void
{
    $table->actions([
        BookmarkAction::make()
    ]);
}

or to your table bulk actions like this

use TomatoPHP\FilamentBookmarksMenu\Filament\Tables\BookmarkBulkAction;
use TomatoPHP\FilamentBookmarksMenu\Filament\Tables\BookmarkBulkClearAction;

public function table(Table $table): void
{
    $table->bulkActions([
        Tables\Actions\BulkActionGroup::make([
            BookmarkBulkAction::make(),
            BookmarkBulkClearAction::make()
        ]),
    ]);
}

Create Custom Bookmark Type

you can create custom bookmark type by use our Facade TomatoPHP\FilamentBookmarksMenu\Facades\FilamentBookmarksMenu register method like this

use TomatoPHP\FilamentBookmarksMenu\Facades\FilamentBookmarksMenu;
use TomatoPHP\FilamentBookmarksMenu\Services\Contracts\BookmarkType;
        

public function boot()
{
    FilamentBookmarksMenu::register([
        BookmarkType::make('hashtags')->label('Hashtags')->panel('employee'),
        BookmarkType::make('folder')->label('Folders'),
    ]);
}

to make label translatable you can use your path direct on label like this ->label('filament.bookmarks-menu::labels.hashtags')

Publish Assets

you can publish config file by use this command

php artisan vendor:publish --tag="filament-bookmarks-menu-config"

you can publish views file by use this command

php artisan vendor:publish --tag="filament-bookmarks-menu-views"

you can publish languages file by use this command

php artisan vendor:publish --tag="filament-bookmarks-menu-lang"

you can publish migrations file by use this command

php artisan vendor:publish --tag="filament-bookmarks-menu-migrations"

Other Filament Packages

Checkout our Awesome TomatoPHP

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-09-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固